# אימייל לא עובד בכלל

**URL:** <https://meta.discourse.org/t/email-not-working-at-all/165117>\
**Category:** Self-hosting\
**Created:** [23 בספטמבר,‏ 2020,‏ 6:10pm UTC](https://meta.discourse.org/t/email-not-working-at-all/165117 "2020-09-23T18:10:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Batman212369](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/batman212369/32/194481_2.png) [@Batman212369](https://meta.discourse.org/u/Batman212369)\
**Post date:** [23 בספטמבר,‏ 2020,‏ 6:10pm UTC](https://meta.discourse.org/t/email-not-working-at-all/165117/1 "2020-09-23T18:10:34Z")

</div>

Hello there. For the past couple of days, I’ve been struggling to setup a Discourse forum, and all the struggle came from the email. I was able to get the forum up by skipping email signup, but I still need it to be functional so people can sign up as well. I have been getting the same results again and again, and I’ve tried many different things, but none seem to have worked. Every time, one of the two would happen:

1. Test email error would say "hostname . . . does not match the server cetificate
2. Test email error would say “502” and in the Sidekiq, the error would be `Jobs::HandledExceptionWrapper: Wrapped Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)>`

So, when does each one appear. Well, number one appears in every single scenario. Number two on the other hand appeared when I used Port 465. It would take some time for it to “send a test email”, and then that error would appear. Just now, I disabled SSL, so Port 587 is usable, but instead of having the error one or two, it is just stuck at “Sending test Email”.

I am not sure what to do at this point, and I’ve been struggling with this for a few days now, and I still have not found a solution. Any help would be very much appreciated. Thank you for your time and help.

**UPDATE:** Using the `curl --ssl-reqd` command, I tested ports 465, 587, 25, and 2525. The results were:  
25: Did not work (Curl error 35, wrong version number)  
465: Worked as intended and fast email response  
587: Did not work (Curl error 35, wrong version number)  
2525: Did not fail, but never sent an email (time spent counted up and never stopped while sending no email)

If it helps, my current settings are (with the 502 error):

```yml
  DISCOURSE_SMTP_ADDRESS: CENSORED
  DISCOURSE_SMTP_PORT: 465
  DISCOURSE_SMTP_USER_NAME: CENSORED
  DISCOURSE_SMTP_PASSWORD: CENSORED
  # DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

```

Templates:

```yml
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

```

And expose:

```yml
expose:
  - "80:80" # http
  - "443:443" # https

```

This is an image with the email information:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/a/ea11f95db65e4bcf613963dabd1a87ecf0d211db.png)

---

_[View the full topic](https://meta.discourse.org/t/email-not-working-at-all/165117)._
