Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Drupal


To send emails from Drupal using SendGrid, you may use the SendGrid Integration module, the SMTP Authentication Support module, the Swift Mailer module, or the PHPMailer SMTP Module depending on your needs.


Using the SendGrid Integration Module

using-the-sendgrid-integration-module page anchor

The SendGrid Integration Module uses the SendGrid API web services to send email. It does not use SMTP. Depending on the workload of your website, this could be of benefit to you in performance. This module also provides charts for reports of vital statistics. The module does require an advanced knowledge of Drupal in order to install and setup. Usage of Drush is required.

Download and install the SendGrid Integration Module(link takes you to an external page) from Drupal.org and perform updates via Drush with Composer Manager.

Once installed access admin/config/services/sendgrid to configure your API credentials.

For detailed instructions, please refer to the module documentation(link takes you to an external page).


Using the SMTP Authentication Support Module

using-the-smtp-authentication-support-module page anchor

To use SendGrid with Drupal(link takes you to an external page), use the SMTP Authentication Support module(link takes you to an external page). Install a version of this module that is compatible with your version of Drupal.

SMTP Module.

Open your modules page, find the SMTP module, and configure it with the following settings:

  • SMTP Server - smtp.sendgrid.net
  • SMTP Port - 587
  • Use Encrypted Protocol - No. If you want encryption choose "Use SSL" and set SMTP Port to 465
  • Username - SendGrid Username: "apikey"
  • Password - SendGrid API Key
SMTP Module Configuration.

Using the Swift Mailer Module

using-the-swift-mailer-module page anchor

To use the Swift Mailer module(link takes you to an external page), install a version of this module that is compatible with your version of Drupal.

Configuration for this module is largely the same as above.

SMTP Module Configuration 2.

Using the PHPMailer SMTP Module

using-the-phpmailer-smtp-module page anchor

PHPMailer SMTP sends email via SMTP using the latest PHPMailer library and is RFC-compliant. It requires the Mail System(link takes you to an external page) module. See the project page(link takes you to an external page) for more details.

Install using composer and enable.

composer require drupal/phpmailer_smtp

Once installed access admin/config/system/phpmailer-smtp to configure the module.

  • Primary SMTP server - smtp.sendgrid.net
  • SMTP port - 587
  • Use Secure Protocol - TLS

Under SMTP Authentication, set your username and password (API key):

  • Username - SendGrid Username: "apikey"
  • Password - SendGrid API Key

Rate this page: