12Fill in your Gmail username (email address) and App-specific password, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmail authentication details on any of our Gmail Choreos and it will also make your PHP code simpler and more secure.

Test the Choreo

13On Google > Gmail > SendEmail Choreo page, Select PHP from the drop down menu at the top of the page. Insert your new Profile and fill in the rest of the required inputs.

14Click Generate Code to test the Choreo from our website, and you'll see the value "true" for the Success output in the Output section. Assuming you emailed yourself, you can go to your inbox and see the email appear!

Create Your PHP Program

15To send an email from your PHP code, copy the generated Code from your browser directly into your PHP script and try running it there. Remember to comment in the line that declares the Temboo_Session object and substitute in your Temboo account details - you can find these on your Temboo Applications page. You'll also need to substitute in the name of the Gmail Profile you created earlier. Your code should look something like this:

What next?

We're all finished! Now your PHP application is sending email via your Gmail account. Why not check out the rest of the 2000+ Choreos in our Library and think about how you could extend this example by combining it with something else.

Once you've got your code up and running, you're ready to move on and do more. From monitoring your running applications, to moving your generated Temboo code to your preferred development environment and sharing it with colleagues, collaborators and friends - we've got you covered.

Commit Code to GitHub

Commit Temboo-generated code directly to GitHub and share with the world. Learn more.

Need help?

We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.