# E-Mail kann nicht gesendet werden

**URL:** https://meta.discourse.org/t/unable-to-send-email/158509
**Category:** Self-hosting
**Tags:** email
**Created:** [22. Juli 2020 um 15:32 UTC](https://meta.discourse.org/t/unable-to-send-email/158509 "2020-07-22T15:32:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Sasiko](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasiko](https://meta.discourse.org/u/Sasiko)
#### Post date: [22. Juli 2020 um 15:32 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/1 "2020-07-22T15:32:26Z")

</div>

telnet smtp.mydomain 587

```
Trying IP..
Connected to smtp.mydomain.com.
Escape character is '^]'.
220 smtp.mydomain.com ESMTP

```

Ich habe unzählige Male neu aufgebaut und kann E-Mails mit der Online-Testseite [SMTP Test Tool](https://www.gmass.co/smtp-test) erfolgreich versenden.

Das Problem ist, dass Discourse überhaupt keine E-Mails versendet, weder für die Registrierung noch zum Zurücksetzen des Passworts.

---

<div class="post-metadata">

### Author: ![Sasiko](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasiko](https://meta.discourse.org/u/Sasiko)
#### Post date: [22. Juli 2020 um 15:36 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/2 "2020-07-22T15:36:17Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/4/2/427b8cd06f0e4ad8c0da9cb69b53ac7980a0c423.png)  
Es gibt keine Protokolle für  
übersprungen, zurückgewiesen, empfangen und abgelehnt

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [22. Juli 2020 um 15:40 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/3 "2020-07-22T15:40:30Z")

</div>

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326):
>
> You just installed Discourse via [the install guide](https://github.com/discourse/discourse/blob/main/docs/INSTALL.md), but email doesn’t seem to work. Unfortunately this means you can’t log in as an admin to finalize the install. cry Let’s troubleshootize! Try the doctor woman_health_workerIf you run ./discourse-doctor it will check several ways that your mail configuration might be broken, and offer advice. Try that first. Did you enter email settings correctly? The simplest way is to run ./discourse-setup again. Did you enter everything correctly? B…

---

<div class="post-metadata">

### Author: ![Sasiko](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasiko](https://meta.discourse.org/u/Sasiko)
#### Post date: [22. Juli 2020 um 16:10 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/4 "2020-07-22T16:10:30Z")

</div>

Ich habe das bereits gelesen, aber es funktioniert immer noch nicht. Ich verwende Mail Tester, und das funktioniert einwandfrei; keine Ports sind blockiert.

```
Started POST "/session/forgot_password" for 162.158.134.56 at 2020-07-22 15:59:02 +0000
Processing by SessionController#forgot_password as */*
  Parameters: {"login"=>"mail@gmail.com"}
Completed 200 OK in 20ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 5382)

```

Ich hoste meinen eigenen Mailserver, und das Versenden von E-Mails funktioniert über Roundcube einwandfrei. Das einzige Problem ist, dass Discourse überhaupt keine E-Mails versenden kann, und es gibt keine Logs, die Fehler oder Probleme anzeigen.

Meine Maildomain ist keine IP-Adresse. Sie basiert auf einem Namen.

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [22. Juli 2020 um 16:25 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/5 "2020-07-22T16:25:09Z")

</div>

Hast du versucht, `DISCOURSE_SMTP_ENABLE_START_TLS` auf **false** zu setzen?

---

<div class="post-metadata">

### Author: ![Sasiko](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasiko](https://meta.discourse.org/u/Sasiko)
#### Post date: [22. Juli 2020 um 16:30 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/6 "2020-07-22T16:30:04Z")

</div>

Ja, hat nicht funktioniert…

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [22. Juli 2020 um 16:31 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/7 "2020-07-22T16:31:54Z")

</div>

Hast du diese Zeile, die sich am Ende der Datei app.yml befindet, wieder aktiviert?

`- exec: rails r "SiteSetting.notification_email='web@example.com'"`

---

<div class="post-metadata">

### Author: ![Sasiko](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasiko](https://meta.discourse.org/u/Sasiko)
#### Post date: [22. Juli 2020 um 16:35 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/8 "2020-07-22T16:35:58Z")

</div>

Ja, es ist auch in der app.yml, nicht auskommentiert.

---

<div class="post-metadata">

### Author: ![zgy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zgy/32/294081_2.png) [@zgy](https://meta.discourse.org/u/zgy)
#### Post date: [17. Februar 2023 um 20:00 UTC](https://meta.discourse.org/t/unable-to-send-email/158509/9 "2023-02-17T20:00:42Z")

</div>

Konnten Sie dieses Problem lösen? Ich habe dasselbe Problem und erhalte jedes Mal die Fehlermeldung „Job exception: Connection reset by peer“, wenn Discourse versucht, eine E-Mail zu senden.
