Skip to content

Email configuration

Mark Fullmer edited this page Sep 30, 2020 · 1 revision

Summary

The system uses SMTP mail protocol to deliver email using a Gmail account.

Technical notes

  1. We use the smtp module for integration
  2. We use config_ignore to ensure that sensitive credentials are not captured as part of site configuration. Configuration settings are stored in a secure location and
  3. For integration with Gmail in particular, we had to do the following, based on comments from https://stackoverflow.com/questions/21937586/phpmailer-smtp-error-password-command-failed-when-send-mail-from-my-server

Configuration snapshot of non-sensitive components shown below:

$config['smtp.settings'] = [
  'smtp_on' => TRUE,
  'smtp_host' => 'smtp.gmail.com',
  'smtp_hostbackup' => '',
  'smtp_port' => '587',
  'smtp_protocol' => 'tls',
  'smtp_autotls' => TRUE,
  'smtp_timeout' => '30',
  'smtp_username' => '<email address>',
  'smtp_password' => '<password>',
  'smtp_from' => '',
  'smtp_fromname' => '',
  'smtp_client_hostname' => '',
  'smtp_client_helo' => '',
  'smtp_allowhtml' => '0',
  'smtp_test_address' => '',
  'smtp_debugging' => TRUE,
  'prev_mail_system' => 'php_mail',
  'smtp_keepalive' => FALSE,
];