Question
· Jan 28, 2020

Multiple Emails from EnsLib.EMail.OutboundAdapter

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
Discussion (2)0
Log in or sign up to continue

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)
}