Index: vhLib/Mail.mac.rou =================================================================== diff -u -r17 -r351 --- vhLib/Mail.mac.rou (.../Mail.mac.rou) (revision 17) +++ vhLib/Mail.mac.rou (.../Mail.mac.rou) (revision 351) @@ -52,13 +52,13 @@ Set MM.From=From New Loop For Loop=1:1:$LL(To) Do - . Do MM.To.Insert($LI(To,Loop)) + . Do smmVoegToeRecipientsAanList(MM.To, $LI(To,Loop), ";") If $D(ccTo) Do . For Loop=1:1:$LL(ccTo) Do - . . Do MM.Cc.Insert($LI(ccTo,Loop)) + . . Do smmVoegToeRecipientsAanList(MM.Cc, $LI(ccTo,Loop), ";") If $D(BccTo) Do . For Loop=1:1:$LL(BccTo) Do - . . Do MM.Bcc.Insert($LI(BccTo,Loop)) + . . Do smmVoegToeRecipientsAanList(MM.Bcc, $LI(BccTo,Loop), ";") Set MM.ReplyTo=$G(ReplyTo) Set MM.Subject=Subject @@ -107,6 +107,18 @@ do SMTP.%Close() Quit Status +smmVoegToeRecipientsAanList(RecipientsList, ToeTeVoegenRecipients, Delimiter = ";") + If $L(ToeTeVoegenRecipients,Delimiter)>1 { + Set Iterator = ##class(TECH.ListIterator).%New(##class(TECH.ListUtils).PiecesToList(ToeTeVoegenRecipients, Delimiter)) + While (Iterator.HasNext()) { + Do RecipientsList.Insert(Iterator.Next()) + } + } + Else { + Do RecipientsList.Insert(ToeTeVoegenRecipients) + } + Quit + MaakEmailAdressenAtVanhoeckeBe(MailMessage) // De EmailAdressen controleren op aanwezigheid van het "@"-teken, en indien nodig aanvullen met "@vanhoecke.be" // Bvb als alleen initialen zijn opgegeven, dit is geen geldig email-adres