Appcelerator Blog

The Leading Resource for All Things Mobile

Using the SendGrid API to send emails from your mobile apps

44 Flares 44 Flares ×

SendGrid is a cloud-based service that exposes and easy-to-use API to send emails from your apps, and Appcelerator apps are no exception. Sendgrid just published an Appcelerator library that makes it even easier to use.

To use it, first sign up for a free SendGrid account at http://sendgrid.com. The user name and password you choose will be the ones you’ll use for the library.

The library is currently hosted on GitHub and soon will be available in the Appcelerator Marketplace. Locate the file tisendgrid.js and copy it to your project folder.

After doing this, using the library is as easy as obtaining a reference and calling the send method.

This code is all you need to send a simple email. If you’d like to send to multiple recipients, simply assign an array of email addresses to the to field like so:

The library also has some other advanced functionalities such as filters, explained in their own blog post.

That’s all there is to it. Stay tuned for a future blog post where I’ll show you how to use SendGrid from your Node.ACS apps.

44 Flares Twitter 20 Facebook 11 Google+ 2 LinkedIn 11 Email -- 44 Flares ×

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

  1. Alex

    I am traying Sendgrid with my mobile app in Visual Studio 2013.
    I have an error with the tisendgrid.js code, that is :

    Ti.Network.createHTTPClient … (Ti is not defined)

    May be I need some more files?

Sign up for updates!

Thank you for subscribing!

Subscribe to:

  
Become a mobile leader. Take the first step to scale mobile innovation throughout your enterprise. Get in touch
computer and tablet showing Appcelerator software
Start free, grow from there.
44 Flares Twitter 20 Facebook 11 Google+ 2 LinkedIn 11 Email -- 44 Flares ×