---
title: "SMTP error \"StartTLS not supported by server or could not initiate session\""
date: "2022-02-24T00:36:32+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94671-smtp-error-starttls-not-supported-server-or-could-not-initiate-session"
id: "bd12cae0-bfcc-4286-9278-c34607f341eb"
---

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](https://docs.acquia.com/cloud-platform/manage/ssh/enable/) 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: no-reply@example.com
    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.