Patrick Rein uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-pre.211.mcz==================== Summary ====================
Name: Network-pre.211
Author: pre
Time: 22 November 2017, 2:44:47.445047 pm
UUID: 5a814be6-cf92-3443-9e5f-eaff4fbd54d1
Ancestors: Network-dtl.210
Adds a method to the SMTPClient for handling the cc and bcc to receiver conversion necessary to actually send mails through cc and bcc.
=============== Diff against Network-dtl.210 ===============
Item was changed:
----- Method: MailComposition>>doSendMail (in category 'private') -----
doSendMail
(SMTPClient openOnHostNamed: self smtpServer port: self smtpServerPort)
user: self smtpUser;
password: self smtpPassword;
login;
+ sendMailMessage: mailMessage!
- mailFrom: mailMessage from to: (mailMessage to findTokens: ',') text: mailMessage asSendableText.!
Item was added:
+ ----- Method: SMTPClient>>sendMailMessage:fromAddress: (in category '*Network-MailSending') -----
+ sendMailMessage: mailMessage fromAddress: sender
+ "Convenience mechanism to handle handling of receivers
+ between MailMessage objects and SMTP."
+
+ | mailMessageToSend recipients |
+ mailMessageToSend := mailMessage deepCopy.
+ recipients := (mailMessage to findTokens: ',') ,
+ (mailMessage cc findTokens: ',') ,
+ (mailMessage bcc findTokens: ',').
+ recipients := recipients asSet collect: [:r | r withBlanksTrimmed].
+ mailMessageToSend bcc: ''.
+
+ self
+ mailFrom: mailMessageToSend from
+ to: recipients
+ text: mailMessageToSend asSendableText!