SendGrid is a 3rd party bulk email delivery provider that features an Event Notification app (https://sendgrid.com/docs/API_Reference/Webhooks/event.html) which is included with their service. This functionality was chosen to integrate as a CiviCRM extension because it's easy to configure what notifications you want sent, features basic HTTP authentication, requires just a "responder" or "listener" (this extension) to receive the notifications from SendGrid and add them to the CiviCRM database, and could be developed to be relatively agnostic of a specific organization and distributed to the CiviCRM community.
The email events that SendGrid sends notifications of include: Processed, Dropped, Deferred, Delivered, Bounced, Opened, Clicked, Unsubscribed From, Marked as Spam, ASM Group Unsubscribe, ASM Group Resubscribe. While it is safe to select all actions to be reported by the SendGrid Event Notification app, for better performance Processed, ASM Group Unsubscribe, andASM Group Resubscribe should be deselected. They are essentially meaningless and therefore ignored. CiviCRM already counts an email as delivered as soon as the mail is sent, so Delivered is also ignored. Deferred is simply a temporary failure that will be reattempted; this extension does nothing more that record it to the main CiviCRM log, so you may wish to deselect this action as well.If a particular event type (like click-throughs) were not selected to be sent then the extension simply skips processing that event. This way if a Civi site owner wants to have CiviMail process certain events they can.
The extension allows the site admin to select if they would like SendGrid or CiviCRM to process Openand Click-through events, and if tracking should be made optional per mailing. The extension adds a Mail Spam Report template and includes spam reports on the Mail Summary and the Detailed Report for the mailing. The extension also supports authentication with a username and password.
To install add to your CiviCRM Extentions folder, enable, then go to Mailings > SendGrid Configuration to configure settings. The extension will display the HTTP Post URL to configure in your SendGrid Event Notifications App, as well as other server configuration instructions if needed.