Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Send Text Message Using SMTP API

Overview
This example will allow you to use an SMTP server to send a SMS message to a cell phone.


Description

With the SMTP API you can send an email to your phone as a text message.  There are a lot of different servers you can use the default in this example is using GMAIL through the smtp.gmail.com server.  Most SMTP servers should work, but the server and cell phone needs to be compatible to send and receive SMS messages, more information can be found in the reference.

 
Requirements

  • LabVIEW 2013 (or later)

 

Steps to Implement or Execute Code

 1. Open Send Text using SMTP API.vi

 2. Fill in the SMTP server in the Outgoing Mail Server (SMTP), gmail is the default server

 3. Fill out your email & Password

 4. Select your Carrier and Type your Phone Number

 5. Type the text you would like to send in the Body Control

 

Additional Images or Video

Send Text using SMTP API.png

 

Reference

 http://digital.ni.com/public.nsf/allkb/5C55FAEDC7BF5C0C862570930054D39F?OpenDocument

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Regards,

M. Whitaker
ni.com/support
Comments
Member usuefdl
Member

I know that I am typing in my password email combo correctly however I continue to get the error saying I have typed in the wrong username password combo. What am I doing wrong? I am running LabView 2015

Member GarryG
Member

I ran into this same issue.  You likely need to change a security setting in your email.  When I tried this on Gmail (with the correct authentication, but getting the same error message) I logged into my email and Gmail had sent a message saying they were blocking access from an unauthorized program.  In the email, there was a link to allow this type of access (they warn that it's lower security, but I did it anyways).  Once this was enabled, it worked like a charm.

CLA, CTA
Not my tempo... AGAIN!
Member jprevost
Member

The "from" needs to have the full e-mail address, not just the "username", so concatenate the username with @gmail.com

This fixed it for me as I was having the same problem.

Member Gupshup
Member

 Use of API is making things easier day by day and thanks for sharing information to get more clarity .