# Mailgun email configuration for Discourse requires credit card

**URL:** https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342
**Category:** Support
**Created:** [4 במרץ,‏ 2017,‏ 11:07am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342 "2017-03-04T11:07:36Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![panospet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/panospet/32/120406_2.png) [@panospet](https://meta.discourse.org/u/panospet)
#### Post date: [4 במרץ,‏ 2017,‏ 11:07am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/1 "2017-03-04T11:07:36Z")

</div>

Hello Discourse community,

I know there are a few topics about Discourse email configuration, but I couldn’t find a solution to my problem in any of those (to the troubleshooting guide as well). For email provider, I use a Mailgun free account (I want to build a community of about 10-15 people so there is no need for more than 10,000 emails per month). Everything in my Discourse installation works perfectly, except for the emails. Here is where I’ve been so far:

1. I received successfully the confirmation email for the admin account! Isn’t it strange?
2. When I try to send manually an email using my Mailgun SMTP credentials, it is sent successfully (by using [this method](https://documentation.mailgun.com/quickstart-sending.html#send-via-smtp) with my SMTP credentials). This means that my Mailgun account, dns servers, etc are configured correctly, isn’t it?
3. Exactly the same credentials as used in the successfull manually sent email, are entered in the app.yml file.
4. But still, when I send a private message or I reply to a thread that is watched by someone, no emails are sent to his inbox.

Any ideas?  
Thank you in advance!

Edit: Problem solved! I had to enter my credit card details to my Mailgun account.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [4 במרץ,‏ 2017,‏ 11:12am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/2 "2017-03-04T11:12:53Z")

</div>

Did you checked the `/admin/email/skipped | sent | bounced` pages? If the user is active recently in forum when PM sent then the emails will be skipped.

---

<div class="post-metadata">

### Author: ![panospet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/panospet/32/120406_2.png) [@panospet](https://meta.discourse.org/u/panospet)
#### Post date: [4 במרץ,‏ 2017,‏ 11:15am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/3 "2017-03-04T11:15:24Z")

</div>

Thank you a lot.

Can you please elaborate a little bit on that? Where exactly do I go to see those pages for skipped|sent|bounced emails?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [4 במרץ,‏ 2017,‏ 11:17am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/4 "2017-03-04T11:17:00Z")

</div>

In admin page. For example [http://EXAMPLE.COM/admin/emails/skippped](http://EXAMPLE.COM/admin/emails/skippped)

---

<div class="post-metadata">

### Author: ![panospet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/panospet/32/120406_2.png) [@panospet](https://meta.discourse.org/u/panospet)
#### Post date: [4 במרץ,‏ 2017,‏ 11:22am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/5 "2017-03-04T11:22:05Z")

</div>

Hmm, it seems than I have a bunch of skipped emails due to recent subscription of the user.

Why is that? How long does it take? Is there any way I can bypass this feature?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [4 במרץ,‏ 2017,‏ 11:33am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/6 "2017-03-04T11:33:10Z")

</div>

Mails are skipped if the user has been online in the previous minutes because it is likely he saw the notification on the site, and a mail notification would only be an annoying duplicate. Every user can configure this in his own preferences, and you can change the default for new users with the site setting `default email always` 🙂

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [4 במרץ,‏ 2017,‏ 11:33am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/7 "2017-03-04T11:33:44Z")

</div>

> [@panospet](#):
>
> Why is that?

If a user is active in a browser then he will get PM notification. So no need to notify him via email again.

> [@panospet](#):
>
> How long does it take?

Until he is active in the forum in a browser.

> [@panospet](#):
>
> Is there any way I can bypass this feature?

In admin SiteSetting `/admin/site_settings/category/user_preferences` page you can bypass this feature.

---

<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: [4 במרץ,‏ 2017,‏ 12:02pm UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/8 "2017-03-04T12:02:16Z")

</div>

Have you entered your credit card info in Mailgun? I think that is required (even for the free tier)

---

<div class="post-metadata">

### Author: ![panospet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/panospet/32/120406_2.png) [@panospet](https://meta.discourse.org/u/panospet)
#### Post date: [4 במרץ,‏ 2017,‏ 12:16pm UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/9 "2017-03-04T12:16:00Z")

</div>

> [@zogstrip](#):
>
> Have you entered your credit card info in Mailgun? I think that is required (even for the free tier)

Thanks for your reply. I think mailgun is sending emails properly. If I go to email settings and send a test email to a certain address, the email is delivered properly. Thus, I think that Mailgun has no problems.

---

<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: [4 במרץ,‏ 2017,‏ 12:17pm UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/10 "2017-03-04T12:17:19Z")

</div>

People who hadn’t set their CC were able to send the test email but other emails wouldn’t work.

---

<div class="post-metadata">

### Author: ![panospet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/panospet/32/120406_2.png) [@panospet](https://meta.discourse.org/u/panospet)
#### Post date: [4 במרץ,‏ 2017,‏ 12:19pm UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/11 "2017-03-04T12:19:42Z")

</div>

> [@zogstrip](#):
>
> People who hadn’t set their CC were able to send the test email but other emails wouldn’t work.

Sorry for the previous post. I think you are right. I tried to send a private message to a user, and the “skipped emails” section now has the message:

_"[Sender] 554 Free accounts are for test purposes only. Please upgrade or add the address to authorized recipients in Account Settings. "_

By saying “upgrade”, it means that I have to give my credit card to Mailgun?

---

<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: [4 במרץ,‏ 2017,‏ 12:22pm UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/12 "2017-03-04T12:22:12Z")

</div>

> [@panospet](#):
>
> By saying “upgrade”, it means that I have to give my credit card to Mailgun?

Yup. With less than 20 users you will definitely be under 5000 emails per month so no worries. Also I think there is a setting in mailgun to be alerted when you’ve sent X emails per month.

---

<div class="post-metadata">

### Author: ![panospet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/panospet/32/120406_2.png) [@panospet](https://meta.discourse.org/u/panospet)
#### Post date: [4 במרץ,‏ 2017,‏ 1:17pm UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/13 "2017-03-04T13:17:32Z")

</div>

I’ve entered my credit card details and upgraded my account in Mailgun. Now everything seems to be working perfectly. Thank you all for your help!

---

<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: [6 במרץ,‏ 2017,‏ 8:15am UTC](https://meta.discourse.org/t/mailgun-email-configuration-for-discourse-requires-credit-card/58342/14 "2017-03-06T08:15:08Z")

</div>


