Sending an Email from a VI

You can use the Send Email Express VI to quickly send emails from LabVIEW to a list of recipients you specify.

Complete the following steps to configure the Send Email Express VI to send an email:

Note If you want to configure headers, set Transport Layer Security (TLS) settings, or include an attachment, you can use the standard SMTP Email VIs to configure and send an email with more advanced settings. Refer to the labview\examples\Data Communication\Protocols\SMTP\Send Email using SMTP Client.vi for an example of using the standard SMTP Email VIs to send an email.
  1. Add the Send Email Express VI to the block diagram. The Configure Send Email dialog box automatically opens.
  2. Specify your email address or the email address from which you want to send the email in the Sender's Email Address textbox located in the User Information section.
  3. Specify the host name or IP address of the SMTP server, such as my.mailserver.com, you want to use to send the email in the Outgoing Mail Server (SMTP) textbox. If you do not know which mail server to use, contact the network administrator for the name of a valid server.
  4. Specify the port number of the SMTP server you want to use to send the email in the Port textbox. The default is 25, which is standard for open connections. However, if you use a secure connection, you may need to change the port number.
  5. (Optional) Place a checkmark in the Require Log-in checkbox to transmit log-in credentials to the SMTP server. Most public SMTP servers require log-in credentials.
    1. Specify the log-in username, in the Username textbox, for the SMTP server you specify. On most public servers, this is your email address or the email address from which you want to send the email.
    2. Specify the log-in password, in the Password textbox, for the SMTP server you specify.
  6. (Optional) Place a checkmark in the Use Secure Connection (TLS\SSL) checkbox to require a TLS\SSL secured connection when LabVIEW communicates with the SMTP server.
  7. Specify the email address(es) of the recipient(s) in the Recipients textbox located in the Email section. To send an email to multiple recipients, separate each email address with a comma. You must enter at least one email address. You also can wire a recipient list to the Recipients input on the block diagram.
  8. (Optional) Specify the subject of the message in the Subject textbox. You also can wire a subject line to the Subject input on the block diagram.
  9. (Optional) Specify a message in plain text, in the Message textbox, that you want to send to the recipient(s). You also can wire a message to the Message input on the block diagram.
  10. (Optional) Click the Send Test Email button to test the configuration of the VI by sending a test email to the email address you specify in Sender's Email Address.
  11. Click the OK button to save the configuration and close the Configure Send Email dialog box.
  12. Wire all error in and error out terminals on the block diagram.
  13. Run the VI. LabVIEW sends an email according to the configuration you set.