# Issue with mail after install

**URL:** https://meta.discourse.org/t/issue-with-mail-after-install/56930
**Category:** Self-hosting
**Created:** [2017年二月5日 06:01 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930 "2017-02-05T06:01:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [2017年二月5日 06:01 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930/1 "2017-02-05T06:01:39Z")

</div>

Hello,

I just installed discourse in DO and I’m having issues sending email: This is what I see in the logs:

```plaintext
Processing by Admin::EmailController#index as JSON
  Parameters: {"_"=>"1486273924108"}
Completed 200 OK in 18ms (Views: 0.6ms | ActiveRecord: 12.0ms)
Started GET "/about/live_post_counts.json?_=1486273924109" for 69.138.184.85 at 2017-02-05 05:52:04 +0000
Processing by AboutController#live_post_counts as JSON
  Parameters: {"_"=>"1486273924109"}
Completed 200 OK in 20ms (Views: 0.3ms | ActiveRecord: 9.7ms)
Started POST "/admin/email/test" for 69.138.184.85 at 2017-02-05 05:52:18 +0000
Processing by Admin::EmailController#test as */*
  Parameters: {"email_address"=>"computertech2124@gmail.com"}

```

so not sure where Is the problem. I’m using mailgun and I have added all the records required and my domain is verified.

This is what is on my app file:

```plaintext
DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org
  DISCOURSE_SMTP_PORT: 576
  DISCOURSE_SMTP_USER_NAME: postmaster@gaming.org
  DISCOURSE_SMTP_PASSWORD: "mypassword"
  DISCOURSE_SMTP_ENABLE_START_TLS: true    

```

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2017年二月5日 18:04 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930/2 "2017-02-05T18:04:38Z")

</div>

`DISCOURSE_SMTP_PORT` should be `587` instead of `576`.

---

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [2017年二月5日 21:27 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930/3 "2017-02-05T21:27:58Z")

</div>

thank you! I must had misstype it. Now I got it to send the email but, the mailgun logs give me this info:

```plaintext
 "reject": {
    "reason": "Free accounts are for test purposes only. Please upgrade or add the address to authorized recipients in Account Settings.",
    "description": ""

```

I have added the postmaster email as the authorized recipients and I thought mailgun offered free services?

---

<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: [2017年二月5日 23:09 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930/4 "2017-02-05T23:09:02Z")

</div>

A few weeks ago they changed their policy. It is still free for the first 10k messages per month, but you must give them a credit card to be able to send mail.

---

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [2017年二月5日 23:48 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930/5 "2017-02-05T23:48:59Z")

</div>

oh wow 😐 thank you for mentioning. Its mailgun still a better option? It was easier to use them than the other options.

---

<div class="post-metadata">

### Author: ![chagara](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@chagara](https://meta.discourse.org/u/chagara)
#### Post date: [2017年二月6日 00:52 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930/6 "2017-02-06T00:52:47Z")

</div>

so yeah I added my CC and everything worked. Thanks for the information. The support did not even mentioned that.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2017年二月6日 09:23 UTC](https://meta.discourse.org/t/issue-with-mail-after-install/56930/8 "2017-02-06T09:23:03Z")

</div>


