Hello, Joachim.
Nice to hear from you...
I think of those days drinking Mirto in Sardenia quite a bit, lately!!!
I greatly appreciate you taking the time to respond, and send me your code.
As it happens, I actually completed my own solution last night.
I can now create an EMail, set it as HTML or not, attach any number of files,
choose whether the EMail should be base64 encoded or not,
and select both CC and BCC options.
So....thank you!! I'm afraid I just ended up finishing quicker than I expected.
You are right...this new framework is really nice.
As for the CC and BCC stuff....
First of all it is critical to keep any BCC information out of the headers.
I learned that the hard way, some years ago, when I discovered that GMAIL
can show all of the headers...and thereby display the BCC list.
So, my solution, is that I have a bcc and cc instance variables in my EMailMessage
class (names simplified for illustration).
When I format the headers, to send at the DATA step, I do the following:
( self carbonCopy notNilOrEmpty ) ifTrue: [
aStream nextPutAll: 'cc: '.
self carbonCopy doWithIndex: [ :address :index |
( index > 1 ) ifTrue: [ aStream nextPutAll: '; ' ].
aStream nextPutAll: address.
].
aStream cr.
].
I do not add anything to do with the bcc list into this DATA step.
Then, when I actually send the message, I use the following:
sstSmtpClient sendMail: (anEMailMessage formattedMessage) from: self senderName to: anEMailMessage allRecipients
where #allRecipients is
| list |
list := OrderedCollection new.
( self recipientAddress notNilOrBlankString ) ifTrue: [ list add: self recipientAddress ].
( self carbonCopy notNilOrEmpty ) ifTrue: [ list addAll: self carbonCopy ].
( self blindCopy notNilOrEmpty ) ifTrue: [ list addAll: self blindCopy ].
^list
I hope you find that useful!
Thanks again!!!!
Julian