Date Published: February 24, 2022
SMTP error "StartTLS not supported by server or could not initiate session"
Issue¶
Email services routed through the SMTP module can encounter a timeout error if the SMTP service is unavailable or using TLS version 1.0.
Example error:
phpmailerException: StartTLS not supported by server or could not initiate session. in PHPMailer->SmtpConnect()
You can test the timeout behavior by SSH'ing into your server to run the following command, replacing the SITENAME with your application's site name and ENV with the desired environment:
SITENAME@srv-1234:/var/www/html/SITENAME.ENV/docroot$ openssl s_client -connect www.example.com:25 -starttls smtp
connect: Connection timed out
connect:errno=110
It's also a good idea to double check the module variables:
SITENAME@srv-1234:/var/www/html/SITENAME.ENV/docroot/sites/default$ drush vget smtp --uri=https://example.com | egrep "port|protocol|from|host"
smtp_client_hostname: ''
smtp_from: [email protected]
smtp_fromname: 'NAME OF SITE'
smtp_host: smtp-relay.example.com
smtp_hostbackup: ''
smtp_port: '25'
smtp_protocol: tls
Resolution¶
Contact your SMTP service to check for any service-related issues, as well as confirm the SMTP server being used has TLS version 1.2 and above. Please note support for TLS version 1.0 is deprecated on the Acquia platform.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.