# لا أعرف ما الخطأ في خدمة SMTP

**URL:** <https://meta.discourse.org/t/i-dont-know-whats-wrong-with-the-smtp-service/251454>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [11 يناير 2023، 6:51م UTC](https://meta.discourse.org/t/i-dont-know-whats-wrong-with-the-smtp-service/251454 "2023-01-11T18:51:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![youyou](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/youyou/32/287713_2.png) [@youyou](https://meta.discourse.org/u/youyou)\
**Post date:** [11 يناير 2023، 6:51م UTC](https://meta.discourse.org/t/i-dont-know-whats-wrong-with-the-smtp-service/251454/1 "2023-01-11T18:51:34Z")

</div>

أستخدم خدمة [mailgun.com](http://mailgun.com) لإرسال البريد، لكن بروتوكول SMTP الذي قمت بإعداده وفقًا للبرنامج التعليمي لا يعمل. لا يمكنني حتى إنهاء التسجيل كمسؤول

سجل الدخول المشترك/المستقل/log/rails/production.log

```plaintext
Started GET "/finish-installation/register" for 54.151.175.32 at 2023-01-11 18:37:43 +0000
Processing by FinishInstallationController#register as HTML
  Rendered finish_installation/register.html.erb within layouts/finish_installation (Duration: 8.2ms | Allocations: 750)
  Rendered layout layouts/finish_installation.html.erb (Duration: 33.4ms | Allocations: 3008)
Completed 200 OK in 54ms (Views: 36.7ms | ActiveRecord: 0.0ms | Allocations: 4064)
Started POST "/finish-installation/register" for 54.151.175.32 at 2023-01-11 18:37:45 +0000
Processing by FinishInstallationController#register as HTML
  Parameters: {"authenticity_token"=>"rxWiZY9rnT7TRGYXw *****************************iBAFuOoz7pQA", "email"=>"************************* @gmail.com", "username"=>"youyou", "password"=>"[FILTERED]", "commit"=>"Register"}
start
Redirected to https://bbs.doublekm.xyz/finish-installation/confirm-email
Completed 302 Found in 47ms (ActiveRecord: 0.0ms | Allocations: 2579)
  Rendered layouts/email_template.html.erb (Duration: 1.1ms | Allocations: 35)
Started GET "/finish-installation/confirm-email" for 54.151.175.32 at 2023-01-11 18:37:45 +0000
Processing by FinishInstallationController#confirm_email as HTML
  Rendered finish_installation/confirm_email.html.erb within layouts/finish_installation (Duration: 2.5ms | Allocations: 380)
  Rendered layout layouts/finish_installation.html.erb (Duration: 21.1ms | Allocations: 2643)
Completed 200 OK in 26ms (Views: 22.8ms | ActiveRecord: 0.0ms | Allocations: 3240)
Job exception: Net::SMTPUnknownError

fail

```

إعدادات SMTP

```plaintext
  DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: postmaster@sandboxba2 ****************** d8f.mailgun.org
  DISCOURSE_SMTP_PASSWORD: "4223 ********************************************* 5f57"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: sandboxba22 ************************ 8d8f.mailgun.org
  DISCOURSE_NOTIFICATION_EMAIL: no-reply@sandboxba22 *************** d8f.mailgun.org
  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

```

```plaintext
[root@GreenCloud discourse]# telnet smtp.mailgun.org 587
Trying 34.83.33.178...
Connected to smtp.mailgun.org.
Escape character is '^]'.
220 Mailgun Influx ready
quit
221 See you later. Yours truly, Mailgun
Connection closed by foreign host.

```

---

_[View the full topic](https://meta.discourse.org/t/i-dont-know-whats-wrong-with-the-smtp-service/251454)._
