# Can't send mail -- unprocessable entity

**URL:** <https://meta.discourse.org/t/cant-send-mail-unprocessable-entity/75195>\
**Category:** Self-hosting\
**Created:** [1 ديسمبر 2017، 8:24م UTC](https://meta.discourse.org/t/cant-send-mail-unprocessable-entity/75195 "2017-12-01T20:24:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [1 ديسمبر 2017، 8:24م UTC](https://meta.discourse.org/t/cant-send-mail-unprocessable-entity/75195/1 "2017-12-01T20:24:52Z")

</div>

I’ve set up a new site, using my script that calls `discourse-setup` like a normal person would.

Email is not going out. It never shows up in the mailgun logs. I’ve double-checked the password/username and switched from port 2525 to 587. I am able to telnet to both ports from the server (and from inside the container). I’ve rebuilt and rebooted.

It seems like it’s timing out and not connecting at all, but I can’t explain how that could be.

```plaintext
Started POST "/admin/email/test" for 107.206.118.212 at 2017-12-01 20:18:17 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"pfaffman@gmail.com"}
Sent mail to my-test-address@gmail.com (1623.2ms)
Completed 422 Unprocessable Entity in 2117ms (Views: 0.6ms | ActiveRecord: 6.3ms)

```

---

_[View the full topic](https://meta.discourse.org/t/cant-send-mail-unprocessable-entity/75195)._
