Multiple Emails from EnsLib.EMail.OutboundAdapter

Primary tabs

I'm trying to tie IRIS (2019.1) into our Concord Fax cloud-based email-to-fax workflow. We have some sites that require a fax be sent to multiple locations based upon certain data (ie Radiology and Emergency departments). Unfortunately, CC-ing does not work with Concord Fax so I need a way to send the email, change the recipient, and then send it again if certain criteria are met. Is this possible? Do I need to duplicate and rename the method, calling the second one in the MessageMap?

Here's what my code currently looks like:

 
Code

Replies

Have you tried sending the message to several recipients directly? Not CC but TO:

do m.To.Insert("mail1@domain.com")
do m.To.Insert("mail2@domain.com")

Or you can send the same email object to several recipients one by one:

for to = "mail1@domain.com", "mail2@domain.com" {
    do m.To.Clear()
    do m.To.Insert(to)
    set status = ..Adapter.SendMail(m)
    do:$$$ISERR(status) $system.OBJ.DisplayError(status)
}

I did try an additional "To" that failed. However I just did it again and it worked. I assumed it failed because Concord Fax did not support it, but I must have had something else incorrect that has since then been fixed.  Thank you for the sanity-check!