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
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
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.
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?
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?
I have JUST gone through getting this setup with Mail Gun on Digital Ocean today.
This is what I did
setup ghost
setup mail gun
— This includes setting up a custom domain on a paid plan and validating in. It isn’t REALLY a paid plan unless you send tons.
create NEW SMTP details on mail gun for the new custom domain (my website)
edit the ghost config file to have the SMTP details
I had done all this and was having the same problems with the TEST working but the POST TEST when creating a post NOT working.
I realised that I had entered the API key from Mailgun that I got for the sandbox domain when I first registered. So I went to my custom domain on mail gun, went to my API page, got the correct API key, pasted that key in the Ghost admin page for members and then the POST TEST worked as expected.
So if you have the main mail gun ‘test’ working in the admin, then certainly your issue is the wrong API key in the admin.
That said. If this is your error then make sure you have actually entered a title and some content into the post you want to send. If there is nothing it will be submitting a null value to the test.
I tested with a lot of combinations of posts with titles, content, images/no images @fimo, and all the settings are correct API keys etc.
Check the log below for some reason can’t understand the Mailgun EU domain name.
level: normal
"The email service was unable to send an email batch."
InternalServerError: The server has encountered an error.
at new GhostError (/var/www/ghost/versions/3.13.3/core/server/lib/common/err ors.js:10:26)
at mailgunInstance.messages.send (/var/www/ghost/versions/3.13.3/core/server /services/bulk-email/index.js:104:42)
at Request.callback (/var/www/ghost/versions/3.13.3/node_modules/async/dist/ async.js:4617:26)
at IncomingMessage.res.on (/var/www/ghost/versions/3.13.3/node_modules/mailg un-js/lib/request.js:331:19)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Error: Domain not found: smtp.eu.mailgun.org
at IncomingMessage.res.on (/var/www/ghost/versions/3.13.3/node_modules/mailg un-js/lib/request.js:327:17)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[2020-04-16 16:57:52] ERROR "POST /ghost/api/v3/admin/email_preview/posts/5e9737 2e72fd120ed2d4574d/" 500 1405ms
NAME: EmailError
MESSAGE: Domain not found: smtp.eu.mailgun.org