# Cannot send email - problem with port 465

**URL:** <https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [November 18, 2022, 4:11am UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004 "2022-11-18T04:11:29Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [November 19, 2022, 5:12am UTC](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004/6 "2022-11-19T05:12:20Z")

</div>

I traced the code and it seems that `EHLO` wasn’t even reached. The SMTP server is connected but the SSL handshake seems to be missing, so the server quits and Discourse didn’t get any response, thus the error.

So, I suspected that **port 465** support seems to have a bug (it defaults to SSL, but I don’t think Discourse recognizes that) so probably the SSL connection is never established.

Switching to port 25 seems to at least get rid of the error, although I am not receiving any sent email yet…

EDIT: I can confirm that port 25 works properly (as should 587 but unfortunately my smtp server doesn’t expose 587).

I didn’t get any emails before was due to the fact that the Discourse server IP address was temporarily blacklisted by the smtp server because of too many failed attempts.

---

_[View the full topic](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004)._
