Transcript
Page 1: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

Accepting Incoming Email to Rails Apps via SendGrid’s Parse APIs

Presenters:SwiftDeveloper Evangelist, SendGrid

Caleb ThompsonSoftware Engineer, thoughtbot

Date: 5/7/2013

Tuesday, May 7, 13

Page 2: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

HousekeepingØ ReadyTalk Conference Tools Console

• View in Full Screen Mode

Ø Questions for Swift and Caleb

• Ask questions by using the CHAT function

• When the presentation begins, you will see the chat box as a floating window to use at any time

• We will answer as many questions as possible at the end of the webcast. Those questions that we don’t get to, will be answered in a follow up blog post

Ø Follow Up

• You will get an email with a link to the recording and a copy of all slides

Tuesday, May 7, 13

Page 3: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

http://learn.thoughtbot.com

Tuesday, May 7, 13

Page 4: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

SendGrid Overview

• Founded July 2009

• TechStars graduate(Boulder, CO)

• 136 employees across 3 offices– Boulder, CO (HQ) and Denver, CO– R&D: Orange County, CA

$27M venture capital raisedSeries B closed Jan 2012

Angel investors include:• Scott Petry (Founder, Postini)• Matt Mullenweg (Founder, Wordpress)

3

Tuesday, May 7, 13

Page 5: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

Delivering Email at Scale

• Serving 130,000+ customers

• Sending over 7 billion emailsper month

• Transactional and marketing email solutions

4

Tuesday, May 7, 13

Page 6: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

Today’s Speakers

SwiftDeveloper Evangelist, [email protected]

Caleb ThompsonSoftware Engineer, [email protected]

Joel OliveiraSoftware Engineer, [email protected]

Tuesday, May 7, 13

Page 7: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

The Inbound Parse Webhook

EMAIL JSON

1. User sends an email to *@yourapplication.com

2. SendGrid parses the email and attachments

3. You receive a JSON POST to your application

Tuesday, May 7, 13

Page 8: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

Getting things setup

2. Point your domain’s MX records at SendGrid

Type ValueMX 0 mx.sendgrid.net

3. Return a 200 status code from your application

1. Configure your hostname and URL settings

http://sendgrid.com/developer/reply

Tuesday, May 7, 13

Page 9: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

A Sample Payload{ "to":["[email protected]", "[email protected]"], "from":"Swift <[email protected]>", "subject":"SendGrid <3’s thoughbot", "text":"This is some text body action", "html":"Supports <em>HTML</em> as well.", "attachments": 1, // ...}

Tuesday, May 7, 13

Page 10: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

Who uses the Parse API?

Tuesday, May 7, 13

Page 11: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

Demo Time!http://github.com/theycallmeswift/playlist.sendgriddemos.com

http://playlist.sendgriddemos.com

Tuesday, May 7, 13

Page 12: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

https://github.com/thoughtbot/griddler

Tuesday, May 7, 13

Page 13: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

Demo

Tuesday, May 7, 13

Page 14: Accepting Incoming Email to Rails Apps via SendGrid's Parse API

http://learn.thoughtbot.com

Q&A and Next Steps

https://sendgrid.com/user/signup

Sign up for SendGrid:

Learn more Rails techniques with Learn Prime:

Tuesday, May 7, 13