I am trying to send email from localhost to https://mailtrap.io/ but getting an error: Swift_TransportException Connection could not be established with host :stream_socket_client(): unable to connect to tsl://:465 (Unable to find the socket transport "tsl" - did you forget to enable it when you configured PHP?)
.env file looks like:
MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=xxxxxxx MAIL_PASSWORD=yyyyyyy MAIL_ENCRYPTION=tls
All settings are copied from mailtrap for Laravel. But I am not sure cause my Laravel version is 5.7. Why error message says port 465 if .env port is 2525? Php open_ssl is enabled. Any suggestions? Thanks a lot.