Setting up Mailgun with Meteor JS on Heroku - Error 554

I’ve been trying to set up my mailgun to work with my Meteor app. When I use the sandbox, it works perfectly, but when I use the custom domain, I get an error:

Exception while invoking method 'forgotPassword' DeliveryError: Message delivery failed: 554 The domain is unverified and requires DNS configuration. Log in to your control panel to view required DNS records.

I’ve set up my configurations, so when I heroku config on the cmd, I get my vars and they’re all correct.

MAILGUN_API_KEY:       key-<api>
MAILGUN_DOMAIN:        <appname>.herokuapp.com
MAILGUN_PUBLIC_KEY:    pubkey-<key>
MAILGUN_SMTP_LOGIN:    postmaster@<appname>.herokuapp.com
MAILGUN_SMTP_PASSWORD: <password>
MAILGUN_SMTP_PORT:     587

I’ve also set my app’s environment variables in server/server.js like this:

Meteor.startup(function(){
  process.env.MAIL_URL = 'smtp://postmaster%40<appname>.herokuapp.com:<password>@smtp.mailgun.org:587';
});

Am I missing something?

Yes login to mailgun and configure it there. They have great support btw. So it’s not a meteor issue.

I submitted a ticket hours ago but they haven’t responded. Luckily, I see they’re active on Twitter. I tweeted them so I hope I’ll get this resolved soon. Thanks!

You just have to go to:
https://mailgun.com/app/domains/{yourdomainhere}

There you find: Domain Verification & DNS

It will tell you which records you have to add.

1 Like

Yeah, I’ve already done that but for some reason, my configurations are not being registered.