nativeInstallerdrupal

Configure SMTP for outbound emails

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and Mac OS X) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). Learn more.

Drupal 7 and earlier

Install and configure the SMTP Authentication Support module for Drupal 7, as follows:

  • Download the SMTP Authentication Support module for Drupal to your Drupal installation’s sites/all/modules directory and extract. Previous Drupal versions have the module already installed in the modules/ directory.

  • The PHPMailer package is included in Drupal 7. For older versions, follow these additional steps:

    • Create a phpmailer/ directory in the new sites/all/modules/smtp directory.

    • Download the PHPmailer package from Github and extract it to the sites/all/modules/smtp/phpmailer directory.

  • Log in to the Drupal 7 administration panel.

  • Go to the “Administer -> Site Building -> Modules” section and enable “SMTP Authentication Support”.

  • Now go to the “Administer by Module” tab, scroll down to the “SMTP Authentication Support” section and click the “SMTP Authentication Support” option.

  • Enter the following configuration options. For example, if using a Gmail account, replace USERNAME and PASSWORD with your Gmail account username and password respectively.

    SMTP Server - smtp.gmail.com
    SMTP backup server - leave blank
    SMTP port - 465
    Use encrypted protocol - Use SSL
    Username - USERNAME@gmail.com
    Password - PASSWORD
    Email from address - USERNAME@gmail.com
    E-mail from name - the name you want emails to appear to be from (e.g. 'Yourdomain Support' or your real name)
    
  • Send a test email.

Drupal 8

Install and configure the SMTP Authentication Support module for Drupal 8, as follows:

  • Download the SMTP Authentication Support module for Drupal to your Drupal installation’s modules directory and unzip.

  • Log in to the Drupal 8 administration panel.

  • Navigate to the “Extend” tab and enable “SMTP Authentication Support”.

  • Navigate “Configuration” tab, scroll down to the “SMTP Authentication Support” section and select it.

  • On the resulting page, turn the module “On” and enter the SMTP configuration options. For example, if using a Gmail account, replace USERNAME and PASSWORD with your Gmail account username and password respectively.

    SMTP Server - smtp.gmail.com
    SMTP backup server - leave blank
    SMTP port - 465
    Use encrypted protocol - Use SSL
    Username - USERNAME@gmail.com
    Password - PASSWORD
    Email from address - USERNAME@gmail.com
    E-mail from name - the name you want emails to appear to be from (e.g. 'Yourdomain Support' or your real name)
    
  • Enter a test email address.

  • Click “Save configuration” to save your changes and send a test email.

To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid or Mandrill, refer to the FAQ.

NOTE: If you are using Gmail as the outbound email server and have experienced issues trying to send emails correctly, check the Gmail SMTP troubleshooting page to learn the causes of these issues and how to solve them.