-
Notifications
You must be signed in to change notification settings - Fork 0
Email configuration
Mark Fullmer edited this page Sep 30, 2020
·
1 revision
The system uses SMTP mail protocol to deliver email using a Gmail account.
- We use the smtp module for integration
- 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
- 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
- use TLS with port 587 (rather than SSL with port 465)
- Allow "less secure" application in Gmail: https://www.google.com/settings/u/1/security/lesssecureapps
- Unlock the captcha: https://accounts.google.com/b/0/DisplayUnlockCaptcha
- Acknowledge as okay any testing attempts you made: https://security.google.com/settings/security/activity?hl=en&pli=1
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,
];