Send mail to several email addresses at the same time

0

I'm working with GeneXus 15 - Java Web, and I want to know if there is any way to send mail to several people at once, either by placing in a "text box" the emails separated by commas (",") or something similar.

I must indicate that I have been able to send mail, but only to an email.

    
asked by Angel Cayhualla 06.04.2018 в 18:04
source

1 answer

1

If you use the data type MailMessage ,% % co is a collection, so you can add more than one address (the same applies for To or CC ).

&mailRecipient = new()
&mailRecipient.Address = &email1 
&mailRecipient.Name = &name1
&mailMessage.To.Add(&mailRecipient) 

&mailRecipient = new()
&mailRecipient.Address = &email2
&mailRecipient.Name = &name2
&mailMessage.To.Add(&mailRecipient)

and then you can send it for example using the data type BCC .

    
answered by 06.04.2018 в 18:26