• Like
Incoming emails with Griddler
Upcoming SlideShare
Loading in...5
×

Incoming emails with Griddler

  • 249 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
249
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. HANDLING INCOMINGEMAILS TO A RAILS APPMARKUS NORDINDEVCORNER #15torsdag 2 maj 13
  • 2. GRIDDLERGem by Thoughbotwww.github.com/thoughtbot/griddlerBased on Sendgrid Parse APIhttp://sendgrid.com/docs/API_Reference/Webhooks/parse.htmltorsdag 2 maj 13
  • 3. CONFIGURATION3 SUPER EASY STEPStorsdag 2 maj 13
  • 4. SET UP MX RECORDMX record that points to mx.sendgrid.nettorsdag 2 maj 13
  • 5. SENDGRID PARSE APIReceives the emailSend a POST to URI with theemailGriddler by default uses[domain]/email_processorGriddler handles the request andinvokes...torsdag 2 maj 13
  • 6. class  EmailProcessor    def  self.process(email)        #  all  of  your  application-­‐specific  code        #  here  -­‐  creating  models,  processing  #  reports,  etc    endendEMAIL PROCESSORtorsdag 2 maj 13
  • 7. Griddler::Email  methods.to.from.subject.body.raw_text.raw_html.raw_body.attachments.headers.raw_headersEMAIL PROCESSORtorsdag 2 maj 13
  • 8. UP TO SPEEDNOW ALSO REGISTERS THROUGH EMAILS!To: register@uptospeed.seFrom: Your Mynewsdesk emailBody:n  learning(s)n  workout(s)torsdag 2 maj 13
  • 9. THANKS!MARKUS NORDIN - DEVCORNER #15torsdag 2 maj 13