Mailgun email configuration for Discourse requires credit card

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 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.

1 Like

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.

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?

In admin page. For example http://EXAMPLE.COM/admin/emails/skippped

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?

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 :slight_smile:

3 Likes

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

Until he is active in the forum in a browser.

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

2 Likes

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

2 Likes

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.

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

3 Likes

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?

1 Like

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.

3 Likes

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!

4 Likes