Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This is a tutorial that explains how to create an iOS or Android app that uses SendGrid to send email

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 _appMobi
Octocat-spinner-32 images
Octocat-spinner-32 readme-images
Octocat-spinner-32 web
Octocat-spinner-32 webhook
Octocat-spinner-32 .DS_Store
Octocat-spinner-32 README.md
Octocat-spinner-32 aUX_ui.css
Octocat-spinner-32 aUX_ui.min.js
Octocat-spinner-32 aUX_web.all.min.js
Octocat-spinner-32 index.html
Octocat-spinner-32 sendgrid.js
Octocat-spinner-32 style.css
README.md

AppMobi + SendGrid = iPhone or Android Powered Email

This tutorial is based on code created at the App Developer Conference Conference and Hackathon in Santa Clara, CA as a result of about 4 hours of hack time. Thus, it is extremely rough, though it should serve as a good starting point for working with both AppMobi and the SendGrid API. This code has been tested on a MacBook Air running Lion. The iOS portion was tested using an iPhone 4s using the AppMobi labs iPhone app.

This program will allow you to send an email within your iPhone or Android app, view rudimentary account statistics and receive a SMS message when a link is clicked in your email.

Getting Starting

The pre-requisites for this tutorial is installation of the appMobi platform, Twilio account and a SendGrid account (a free account will work).

Once you have completed the above, you are ready to begin.

Setup a New AppMobi Project

Click Start New to get started.

Start New

Choose the Client-Side project.

Client Side

Choose your project name and select which API's you would like to include in your project. For this tutorial, I did not choose any APIs.

Now you should see a screen similar to:

New Blank Project

Code!

Click the Development icon to jump to the folder where your code will be stored.

Development Icon

Note that if you jump up two directories, you will find a ton of sample code to enjoy. I used the Klout source code as my starting point.

Demo Code

Copying this code into your AppMobi directory should produce a working solution for you, which is demonstrated in the video below. Note that you will need to replace the SendGrid and Twilio credentials.

Setup 'SMS on Link Click' Functionality

For the SMS alert to be sent when a link is clicked in your email, you will need to setup the webhook here.

Webhook

You can find the code for the webhook in the webhook directory. This code is placed at the link you specified above.

Something went wrong with that request. Please try again.