One of my favorite parts of SendGrid is our Parse Webhook. It’s a great tool that enables your applications to receive incoming email. One of the lesser known features of the API is the spam_report and spam_score parameters.

Every time your application receives an email through the Parse Webhook, SendGrid uses SpamAssassin and generates a score and report based on the content. We then post those pieces of data to your application along with the other parts of the email. This is useful to discard emails that are spam and avoid your application from having to process junk mail.

Try It Out

To get an idea of how this works. I made a quick application using the Go language called

  1. Write up an email
  2. Send it to

You should get back an email with your spam score and a description of the rules triggered if any parts of the content look like spam.

You want the spam score of your email to be as close as possible to 0 but definitely under 5.

Just For Fun

Send an intentionally spammy message. For example, try this subject line:

And grab the spammy body from this GitHub gist.


If you have any questions feel free to contact me at or on Twitter @kunal732. The code for this program can be found at the bottom of the website.

For more details on the feature behind this tool, download the Parse Webhook Guide.

SendGrid Team
Expert advice and insight about all things email including best practices tips, examples, and advice for marketers, developers, and everyone in between.