LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending email via smtp.gmail.com

Is there any way to send an email via a smtp server (ex. smtp.gmail.com) that requires TLS?  I tried to use the InetSendMail function but it fails (error=-7).  BTW, I'm using LabWindows/CVI version 8.1.1 and 8.5
0 Kudos
Message 1 of 2
(3,993 Views)
InetSendMail does not support TLS (or SSL). If you do not mind using .NET 2.0, then the System.Net.Mail.SmtpClient class in the System assembly lets you do this - this class is new to .NET 2.0. You can call .NET assemblies from CVI by creating a wrapper for the assembly using Tools >> Create .NET Controller - it will take a while to generate and compile the wrappers for larger assemblies. If you cannot or do not want to use .NET then you may be able to find open-source code or C libraries that do TLS.
0 Kudos
Message 2 of 2
(3,970 Views)