Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eduardocruz's avatar

I just had a similar issue. After spending many hours looking into that, I realized the problem is that my server on Digital Ocean had the default SMTYP ports blocked by default. My final tests, /i tried using first LOG instead of SMTP just to make sure that an email was being logged locally. Then I tried using SMTP with Mailtrap, which uses port 2525 locally and on my server. But it didn't work when I tried with Mailgun, which was using port 485 or 587 I think. My final test, I tried Mailgun with port 2525 and it worked just fine.

The worst part is that as described, using a blocked port will not raise any exceptions.

Previous

Please or to participate in this conversation.