Notes on how to configure the Drupal SMTP email module with Gmail

As a brief note to self, when you want to use the Drupal SMTP module with a Gmail SMTP server, such as for a Drupal contact form, the process goes something like this:

  • Install the Drupal SMTP module
  • You’ll need a Gmail account
  • You need to generate a Google app password (see below)
  • Use that app password in the Drupal SMTP configuration
    • Special note: For “Use encrypted protocol”, select “Use SSL”

This isn’t hard to do, it just takes a little time, and I think those are the key points. Other interesting points:

  • Use this Drush command to install the SMTP module: drush en smtp
  • You’ll probably want to install Honeypot (drush en honeypot) and possibly other Drupal anti-spam modules

Good URLs to know:

Other possible Drupal anti-spam modules:


Those notes are for me, but if you need help configuring the Drupal SMTP email module with Gmail, I hope they’re helpful to you as well.