Introducti
This VI mimics the functionality of the SMTP e-mail functions but uses the .NET framework to accomplish the same task. This works with an anonymous server without SSL. For those capabilities, refer to this link.
Steps to Complete
Run the VI attached.
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
I encountered an error when using this VI to send emails. Because the smtpclient instance is not closed properly, if the sending time is too long, eventually the server will time out on the initially established connection. The error message looks like thisTo avoid this, the instance must be properly terminated. I was googling on this, and found out there is smtpclient.dispose() method. But I can not find it in LabVIEW invoke method. Another alternative is Mailmessage.dispose().