Are you certain that email sent from your site was read, or even delivered? Now you can, with the help of SendGrid and one of Eldarion's latest open source contributions.

Are you certain that email sent from your site was read, or even delivered? Now you can, with the help of SendGrid and one of Eldarion's latest open source contributions.

We are big fans of [[http://sendgrid.com/|SendGrid]] here at Eldarion. It's what we recommend to our [[https://gondor.io|Gondor]] customers if they need a mail backend.

One of the cool services that SendGrid offers is their [[http://sendgrid.com/docs/API%20Reference/Webhooks/event.html|Event API]] that it will notify you via an HTTP POST on events related to each individual email that you sent through its service.

There are a number of apps out there to work with SendGrid's service but none that worked how we wanted, so we built a new one. [[https://github.com/eldarion/django-sendgrid-events|django-sendgrid-events]] does one thing, and I believe does that one thing very well.

Our [[https://github.com/eldarion/django-sendgrid-events|django-sendgrid-events]] app is designed to only accept batches. SendGrid allows you to specify if you want to receive each POST for a single email or in batches of emails every few seconds. For our needs it just made sense to handle batches.

Furthermore, [[https://github.com/eldarion/django-sendgrid-events|django-sendgrid-events]] is designed to only handle Events API call backs. It doesn't integrate with any of the rest of the SendGrid APIs. Several apps out there have custom backends for sending mail through SendGrid, but we have been pretty successful just using the SMTP API by just configuring the {{{EMAIL_*}}} settings as appropriate.

The key to linking specific emails with activity in your site is in sending special headers when you send the email. You can see examples of this in the [[http://django-sendgrid-events.readthedocs.org/en/latest/usage.html#usage|usage documentation]].