Email newsletter with mailgun

When I try sending an email I get this error message:
Error sending mail, please check your Mailgun configuration

Is there anything I need to do from the end of mailgun, or is just a matter of putting in my email, sending domain and key?

And is the public key or the private key I should be putting there (I have tried both)

Thanks!

If you’ve not already, you’ll need to follow the steps written up here on how to configure Ghost with Mailgun:

Hi David,
Thanks for replying. I have already done this, and I am able to send test emails. Not real emails through the labs interface. When trying to send a test for a draft post, it does not work though.

Are you saying you are, or are not, able to send a test email using the test email option on the Labs page? If that isn’t working then you may have it configured incorrectly

I am able to send test emails using the Labs interface.

Not using a draft post though: “Error sending mail, please check your Mailgun configuration”

And presumably not with a new post.

Is this on a working draft that you have now? Could you try creating a new test draft and try sending a test? Thanks :slight_smile:

I just made a new draft post and tried to send an email test again and it didn’t work.

Just checked about the Labs email test option and that isn’t related to the members beta feature. Meaning this must be a Mailgun configuration issue. Probably wise to check over your setup and sure everything has been entered correctly :slight_smile:

But I can send a test email through labs, just not through the post. Shouldn’t a mailgun configuration issue have stopped that?

I also didn’t install ghost 3 from scratch, but rather I upgraded it. Would that had made a difference?

The Labs option you’re clicking is designed to test whether Ghost can send an email like a new user email. The beta Members feature is designed to send to send lots of emails, which is why it needs a service like Mailgun to handle the possibility of sending a lot of emails.

Oh I see, thanks for the clarification!

When you say a mailgun configuration issue, you mean the mailgun info entered into Ghost. Or do you mean something from on the side of mailgun.

Is there anything special I need to know about configuring mailgun? Which key should I put in the public or private? And is there anything I have to do from the mailgun side? And if I have more than one list, how does ghost know which list to send to?

  1. You need to put the private API key. The public key is for email validation which is another thing.
  2. The easiest way to find out you’ve configured Mailgun correctly is seeing if the records are checked off in “Domain settings > DNS records”
2 Likes

Thanks for this!

If mailgun works (I sent emails with it weekly) it means it is configured correctly? As in, there’s nothing special I have to do on the mailgun end to get it to play nicely with ghost?