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 ×