Error 56 While Sending an Email via SMTP Server

Updated Nov 15, 2022

Issue Details

I would like to send an e-mail using "Send Email using SMTP Client" shipped example. I entered all of the required input values including outgoing server address, login credentials and destination address. When I am trying to send the message the following error is showing up:
Error 56 occurred at LabVIEWSMTPCLient.lvlib:Send.vi:2280004
LabVIEW: (Hex 0x38) The network operation exceeded the user-specified or system time limit.

Solution

There are several factors that can cause Error 56. Perform the following operations to resolve this issue:
  • Allow LabVIEW to obtain access to the internet and add a firewall exception.
    1. Open Firewall & network protection in your Windows PC.
    2. Select Allow an app through firewall.
    3. Scroll through the list of allowed applications and verify that LabVIEW is enabled for Domain, Private and Public.
    4. If LabVIEW does not appear, launch LabVIEW and click Change settings from the top.
    5. Select Allow another app...
    6. In the pop-up window, select Browse...
    7. Navigate to C:\Program Files (x86)\National Instruments\LabVIEW <version> and select the LabVIEW executable.
    8. Click Add to close the pop-up window.
    9. Click OK to close the Allowed apps window and save changes.
  • Check the status of your internet connection by directly pinging the SMTP server through Command Prompt.
    1. Open Command Prompt.
    2. Type in the following command: ping <SMTP server address>. For example, ping smtp.gmail.com
    3. If the server can be reached, Command Prompt will display a reply as shown below.
ping smtp server.PNG
  • Make sure the following ports are opened in your local network: 25 (SMTP), 465 (SMTP over SSL), 587 (SMTP Submission).
  • Some of the mailbox providers by default blocks 3rd party application access thought SMTP. Change these parameters in your mailbox settings if necessary.