Here we'll show you how to send an email via Gmail from your TI LaunchPad. Imagine all of the notes you can have it send - reminders, alerts, sweet nothings, etc.
This sketch uses our Google > Gmail > SendEmail Choreo.
1Make sure you have a Temboo account. If you don't already have one, you can register for free.
2Next, make sure that you've got the latest version of Energia.
3We recommend creating a new Gmail account for sending email programmatically—you can do that here. After you've created your new account, you can skip to step 11.
If you'd like to use an existing Gmail account, you'll need to enable 2-Step Verification and generate an App Password for Temboo. Steps 4 - 10 show you how to do that.
4Sign in to your Google Account settings page by clicking on your name or picture in the upper right corner of the screen and then clicking Account.
5Scroll down to the "Signing in" box.
6Click 2-Step Verification. This will bring you to the 2-Step Verification settings page.
7You will then see a step-by-step guide which will guide you through the setup process.
8After you've enabled 2-Step Verification, you'll be prompted to create an App Password.
9In the Select app dropdown menu, choose "Other", and give this app a name (e.g., TembooApp).
10Click "Generate". You'll be given a 16-digit passcode that can be used to access your Google Account from Temboo.
Note: If you wish to authenticate with OAuth credentials, you should use the Google > Gmailv2 Choreos.
11Go to the Google > Gmail > SendEmail Choreo in our Library.
12Turn IoT Mode ON, select your board from the drop down menu and make sure that you've added details about how your LaunchPad is connected to the internet.
The IoT Mode switch can be found on each Choreo page in the Temboo Library
13Test out the Choreo from our website and confirm that you can send an email to yourself.
Testing the SendEmail Choreo from our website
14When you've confirmed that the Choreo runs successfully, scroll down to the CODE section then copy and paste the LaunchPad snippet into Energia.
15The auto-generated sketch references the
TembooAccount.h header file, which contains your Temboo account information and network interface details. You'll find the code for this file beneath your generated sketch. Create a new tab in Energia called
TembooAccount.h and copy in the header file information.
16The final step before running any sketch is to confirm that you've selected the appropriate board and serial port in Energia. Go to the Tools > Board menu and select the LaunchPad you're working with. Then go to Tools > Serial Port and select the port your board is connected to.
Select your board and port from the Energia Tools menu
17With both files in place you are ready to upload the sketch and start sending emails from your LaunchPad. If you sent the email to yourself, you'll be able to see a new message in your inbox. You've got mail!
Now that your LaunchPad is sending emails, why not check out the other 2000+ Choreos in our Library and start thinking about all the possibilities for your next LaunchPad project.
We're always happy to help. Just email us at email@example.com, and we'll answer your questions.