Laravel SMTP Mailer TransportException: Connection Timeout Error

Posted by

While working on a project that involved sending emails through Amazon SES (Simple Email Service) using Symfony, I encountered a frustrating error. It looked something like this:

Root Cause

After reviewing the configuration, I realized that the error was due to a typo in my .env file where the MAIL_PORT was incorrectly set. I had mistakenly set MAIL_PORT=111 instead of the correct value MAIL_PORT=111. Port 222 is typically used for SMTP submission, while port 111 is incorrect, leading to the connection failure.

The Solution

To resolve this issue, I corrected the MAIL_PORT in my .env file

After making this change, the connection to the SMTP server was successfully established, and the emails were sent without any issues.

More topics on Bug fixing:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x