Install and configure SendGrid (Drupal 7)


Emails from websites tend to end up in spam boxes. This is getting a harder problem every day. It's very unpredictable and debugging is really hard. 

In come transactional email services: these services deliver emails with a specific API or SMTP. They also offer tracking of email delivery. 

There are many services on the market with such services. 

The most common providers on 

In this tutorial I will focus on SendGrid. SendGrid is one of the biggest transactional email providers; it's moderately priced and is a good choice for SMB's. 

Sending with the API or with SMTP? 

Most transactional email providers recommend sending through an API. Sending with an API is faster and scales better. Using SMTP on the other hand has the advantage of being more flexible. 

For example, when using Drupal, you could install the SMTP module ( and switch between providers easily. When using an API: the setup is often tied to one provider. 

Installation and configuration of the SMTP-module on Drupal 7

Install the SMTP module and configure it with these settings: 

  • SMTP Server -
  • SMTP Port - 587
  • Use Encrypted Protocol - No. If you want encryption choose "Use SSL" and set SMTP Port to 465
  • Username - SendGrid Username
  • Password - SendGrid Password


Installation and configuration of the API on Drupal 7



  • Enable the module. 
  • Go to /admin/config/services/sendgrid and enter the API Secret Key. 
  • Test if everything is working well under /admin/config/services/sendgrid/test by sending a test email message. 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.