You can create a case in a VI that, when executed, sends an email from LabVIEW to a list of recipients you specify. You can configure the email so it includes a value from the VI that is important to the recipients(s). You also can send email to pagers that support receiving email.
Complete the following steps to create a VI that sends an email to a recipient.
- Place the SMTP Email Send Message VI on the block diagram.
- Specify the mail server.
- Right-click the mail server input and select Create»Constant from the shortcut menu.
- In the empty constant, enter the name of the mail server, such as my.mailserver.com. If you do not know which mail server to use, contact the network administrator for the name of a valid server.
- Specify the recipients of the email.
- Right-click the recipients input and select Create»Constant from the shortcut menu.
- In the empty array constant, enter the email address or addresses of the recipients you want to receive the email. You can separate addresses with commas or each address can be a separate array element.
- Add a subject to the email.
- Right-click the subject input and select Create»Constant from the shortcut menu.
- In the empty constant, enter a subject for the email. This text appears in the subject line of the email.
- Wire a string to the message input that contains the information you want all recipients to receive.
- Wire all error in and error out terminals on the block diagram.
Refer to the labview\examples\comm\smtpex.llb for examples of using the SMTP Email VIs.