From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SMTP send email to multiple recipients

Solved!
Go to solution

I am trying to send an email to multiple recipients use the .NET Constructor. It works great when sending to one email but how do I format the string to send to multiple recipients?

 

Can someone help on how the format needs to look like?

 

Capture.JPG

0 Kudos
Message 1 of 3
(2,829 Views)

I'm still working on trying to get the appropriate .NET API available to check, but based on the documentation here: MailMessage-To (.NET Framework), you should be able to get a MailAddressCollection and then modify that with additional addresses to send to multiple addresses at once.

 

This thread might also be helpful: https://forums.ni.com/t5/LabVIEW/Send-email-on-labview-using-the-Gmail-Server-TLS/td-p/474461/page/9 (see message 84 onwards).


GCentral
0 Kudos
Message 2 of 3
(2,784 Views)
Solution
Accepted by topic author GaryGC

The solution is to change the property to string. Now I can send to multiple by adding the comma between the emails.

0 Kudos
Message 3 of 3
(2,765 Views)