# Net::SMTPAuthenticationError due to wrong mailgun server

**URL:** <https://meta.discourse.org/t/net-smtpauthenticationerror-due-to-wrong-mailgun-server/278420>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [September 9, 2023, 3:23pm UTC](https://meta.discourse.org/t/net-smtpauthenticationerror-due-to-wrong-mailgun-server/278420 "2023-09-09T15:23:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![hostingpeep](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hostingpeep/32/325514_2.png) [@hostingpeep](https://meta.discourse.org/u/hostingpeep)\
**Post date:** [September 9, 2023, 3:23pm UTC](https://meta.discourse.org/t/net-smtpauthenticationerror-due-to-wrong-mailgun-server/278420/1 "2023-09-09T15:23:22Z")

</div>

Hello Community! after installing discourse I am struggling with email setup. I did necessary setup with mailgun. Sending email to [admin@domain.com](mailto:admin@domain.com) from my [mail.google.com](http://mail.google.com) (normal gmail) is working fine. But when I use it with app.yml config, I get following error and did not receive an email. It is very 1st email, I am not able to sign up for my forum.

**I think it is due to plain auth. I read it on one of thread. But I don’t know about solution.**

Discourse doctor:

 ![](https://global.discourse-cdn.com/meta/original/4X/6/a/3/6a35caf06e98bef747acd202c4d54732e2446900.png)  
app.yml  
 ![](https://global.discourse-cdn.com/meta/original/4X/6/2/7/6276b7a747410aca3e7816d0d2778e1275b881fe.png)  
I have taken look over some other smtp threads in this problem.

- [UNEXPECTED ERROR Net::SMTPAuthenticationError](https://meta.discourse.org/t/unexpected-error-net-smtpauthenticationerror/236424)
- [Port 443 of computer does not appear to be accessible using](https://meta.discourse.org/t/port-443-of-computer-does-not-appear-to-be-accessible-using/160267)
- [Unable to send mails using Discourse](https://meta.discourse.org/t/unable-to-send-mails-using-discourse/51296)
- [Cannot send email - problem with port 465 - #9 by RGJ](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004/9)
- [Yet other SMTP 587 port email various errors](https://meta.discourse.org/t/yet-other-smtp-587-port-email-various-errors/264267)
- [Smtp doctor test using port 465 even though its configured to use 2525 - #11 by Bryan\_Joseph](https://meta.discourse.org/t/smtp-doctor-test-using-port-465-even-though-its-configured-to-use-2525/238372/11)

Thanks for your time and support.

---

_[View the full topic](https://meta.discourse.org/t/net-smtpauthenticationerror-due-to-wrong-mailgun-server/278420)._
