This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Errors with SMTP Email VIs

Updated Dec 18, 2023

Reported In

Software

  • LabVIEW

Issue Details

I am getting errors when trying to send an email from LabVIEW using the SMTP (Simple Mail Transfer Protocol) Email VIs. These errors include Error 1, Error 59, Error 62, Error 63 or Error 363513. How can I avoid these errors?

Solution

Errors when using the SMTP Email VIs can occur for a number of reasons. The most common reasons include the following:

Wrong server name
Many companies have their own SMTP mail servers. However, the server name is not necessarily the same as the company website or email extension. It is best to contact your IT department or Internet Service Provider for more information on your SMTP server’s name and IP address.

Mail server is down
Occasionally, mail servers do go down and are unable to handle email requests. Under this circumstance, the SMTP email VIs are not able to send mail until the server is back up again. Troubleshooting this issue is fairly straightforward and can be done with the command prompt. Ping the mail server name by opening a command prompt (Start » Programs » Accessories » Command Prompt) and typing ping [mail server]. If the server issues a response, you can verify that the mail server is active. If pinging the mail server results in a timeout, the server is down or nonexistent. In addition, when the mail server is physically down, you will not be able to receive email from that server in a traditional Lotus or Outlook account. If you are able to receive traditional email from the server, then the server is functioning correctly.

SMTP port 25 is being blocked by the PC
A third possible reason for errors is that port 25 is being blocked by your computer. This is a common error because both firewall and some anti-virus services frequently block port 25 for security reasons. To ensure that this is not the problem, disable all firewall and anti-virus software and try running the VI again. Note that Windows firewall software allows you to configure exceptions on various ports. Thus, it is possible to leave the firewall on and simply configure port 25 (SMTP) to be open. One troubleshooting technique to test the SMTP connection is with the telnet command. You can connect to the mail server by opening a command prompt (Start » Programs » Accessories » Command Prompt) and typing telnet [mail server] 25. If your connection request is accepted, you can verify that your PC is able to connect to the mail server on SMTP port 25. If the port is being blocked, the connection attempt will fail.

The internet service provider (ISP) is blocking TCP port 25 (SMTP)
SMTP VI errors can occur when port 25 is being blocked by the ISP. Many commercial internet service providers ISPs block port 25 because of spam and malware traffic. If you are unable to connect to the server with the troubleshooting methods shown above - contact the server administrator or ISP. In rare cases when there is no chance to contact internet provider you can try to use port 465 or port 587. Port 465 supports secure connections via SSL. Port 587 can be used by almost every outgoing SMTP server and it's supporting unencrypted or TLS connections.

Make Sure you are using the correct Outgoing Mail Server (SMTP)
If the server or the port isn't correct you might get Error 59 or 363513, to make sure you are using the correct server with the corresponding port see POP and IMAP email settings for Outlook , as the document mention some of the servers will need TLS/SSL Encryption. If this is the case you will need to fill in the username and password and enable TLS/SSL. Most of the time the username will be your Email and the password will be your Email password. 

Additional Information

In some situations, it is not possible to remove a firewall or disable virus scanning software due to security requirements. In these instances, it is still possible to send email from LabVIEW using ActiveX calls to your current email software. ActiveX programming uses registered components from existing software such as Microsoft Outlook. Thus, with ActiveX programming, you can use the Outlook engine to send email from LabVIEW.