SendGrid Logo ### Using SendGrid Email APIs
to Bring Your Eh? Game ##### aka, Integrate our Email deliverability
platform in under 5 minutes Ian Douglas, [](

Email Delivery. Simplified.

Why use SendGrid's Infrastructure?

  • Building/Maintaining your own is "teh suck"
  • Focus on your business instead
  • Reliable delivery, Scalability, Real-time analytics
  • We have a free developer account,
    200 Emails/day:

Who Uses SendGrid?

customer logos: Pinterest, Twilio, TechStars, Foursqure, Spotify, Uber, Path, airbnb and more!

Python-friendly Partners

Heroku Windows Azure
Softlayer BitPusher

Services/API's we offer

  • Send Email:
    • SMTP
    • SMTP API
    • Web API
  • Newsletter API
  • Account Configuration over API
  • Parse Webhook for incoming Email
  • Event Notification Webhook

Installation of our Python
SMTP/Web Mail API library

  • $ sudo easy_install sendgrid
    $ git clone
    $ cd sendgrid-python
    $ sudo python install

5 lines of code

  • import sendgrid
    # build an auth object
    sgauth = sendgrid.Sendgrid("username", "password",
    # build a message object
    sgmsg = sendgrid.Message("", "subject",
        "plaintext body", "html body")
    # add a recipient
    # send the message

Live Demo

  • Live Photo Booth App
  • Stores images on disk
  • We want to Email photos to ourself
  • Works on Chrome v22+, Opera 12.0+, requires a webcam
  • demo
  • Heroku Demo

Great Analytics and Stats

SendGrid Statistics page
## Real-Time Event Notifcation * give us a web endpoint * POST data to you in batches of JSON * real-time reporting on the following events:
  • processed
  • delivered
  • dropped
  • deferred
  • bounced
  • message opened
  • link clicked
  • unsubscribe
  • marked as spam
  • * current latency to your endpoint is ~5 seconds

    Tim Horton's Challenge @iandouglas736 #pyconca