Membership Query - Mailgun API Settings Working?

Hi all

I’ve just freshly installed the latest version of Ghost on a fresh Lightsail instance. Everything works as expected except when I try to get the membership feature, or ghost in general, to send emails. I just get a message saying server error. Everything is authenticated and ready to go at Mailgun, but I don’t think it is even reaching Mailgun.

I know this feature is in beta, but has anyone else had success or failure with this feature within the labs page also?

I could edit the code to use the SMTP options of Mailgun, but I wanted to try and get the API feature working, and now it is bugging me :slight_smile:

Thanks for all help.

Rich

image

This screenshot shows the settings I have inserted, but I just get a ‘server rejected’ message and the mailgun logs show nothing.

“Mailgun domain” is most probably marsdentravels.com (should you have added your root domain to mailgun)

Thanks for the suggestion Pat, but I definitely set the domain to mg.marsdentravels.com

So, mg.marsdentravels.com (I mean, only that, not the full https link you now have) is what I suggest you should have in your “Mailgun domain” in the screenshot you’ve sent.

Having said said, I went through difficulties when using a subdomain (like you are doing) (which is a pity, since bulk emails should optimally be sent via a subdomain) and ended up going back to Mailgun and creating a “Mailgun domain” for my root domain and then declaring that in Members → Email settings (in your case marsdentravels.com). This fixed it for me.

1 Like

@rjmarsden which emails are failing exactly? There are two mail configs in Ghost:

  1. Transactional: configured in your config.production.json file (see docs). Used for staff user invites, member signups/logins, and the “test email” button in labs
  2. Bulk email: configured under the member settings in Labs. Only used when sending posts to your members when the option is selected when publishing posts
2 Likes

Thanks Kevin and Pat. Let me check both of these and confirm.

Thinking about it, I think you have both fixed my issue though.

Thanks @Kevin and @pateskinasy. both your posts got me thinking. I was using the incorrect domain within the bulk section, and when I changed the transactional email settings to SMTP in the json file it worked as well.

All sorted, thank you both very much :+1: :+1:

2 Likes