Error 59 When Using SMTP API in LabVIEW

Updated Jan 12, 2023

Reported In

Software

  • LabVIEW

Issue Details


I am trying to use the SMTP API in LabVIEW 2013 or later to send an email. I keep getting the following error message:


Why am I getting this error?

Solution

There are two likely causes to this error: 
 

Antivirus or Firewall

This error is generally caused by an antivirus or firewall rejecting the connection. Try disabling the antivirus or firewall to see if your application or VI is being blocked. If so, try adding exceptions for the port you are using in your antivirus or firewall so that the connection is no longer blocked. 
 

SMTP Settings

Ensure that the port number, outgoing SMTP mail server, and TLS enablement are all configured to the correct settings. For example, if you are sending an email from a gmail account, ensure that you are using port 587, "smtp.google.com" as the mail server, with TLS enabled.