I'm trying to send Drupal 8 emails using Swift Mailer (5.4.8, 8.x-1.0-beta1) and a remote SMTP server. The transport should be encrypted, so TLS should be used. This is my setting:
Unfortunatly when trying to send an email I'm getting a warning:
Warning: no valid certs found cafile stream: `/etc/apache2/ssl/certs/' in Swift_Transport_StreamBuffer->startTLS() [...]
And this error afterwards:
Unable to connect with TLS encryption
Without the encryption I'm able to send mails using the remote STMP server.
A test of the connection using TLS from the server where Drupal is installed looks fine (I guess):
openssl s_client -connect mail.example.com:25 -starttls smtp
The response (excerpt):
CONNECTED(00000003)
[...]
---
No client certificate CA names sent
---
SSL handshake has read 4369 bytes and written 586 bytes
[...]
So where do I get further details about the connection error? And what could be the cause of the problem?
25
is the correct port? On most mail hosts I've used, the encrypted port is465
, and25
is unencrypted.25
. I get an timeout error, when using port465
.