I designed a UI for sending basic email which can be done through
SMTPClient
deliverMailFrom: sender
to: recipients
text: message
usingServer: '' .
I have a method that will take Email ,subject all headers from user. Here is my Method.
AddHeader:Headername Email: asString Message:message --> "I want to update this"
" update is nothing but adding dictionay values to that "
|data|
data:= Dictionary new.
'To'= Headername ifTrue[data at:#To put:Email.].
'From'= Headername ifTrue[data at: #From put:Email].
'subject'= Headername ifTrue[data at: #subject put:Email].
"adding dicitonay values to message"
message:= String streamContents:[:stream|
data values do:[:each| stream nextPutAll: each ]
separatedBy: [ stream nextPut: Character space ]].
When i try to save this method i get an error saying Cannot store into message. so whats the right way to add values into message that's already been defined.
And other thing values added from dictionary are not added in the order they been put. so is there a way i can add these values in order they been put like To first, From next , then subject..