Ghost 3.1 Can't get Mailgun & Member signup working on my Ghost install

My DNS are configured already with the SPF record and is validated by Mailgun but still receiving the email in spam (it’s happening in two blogs, both with Digital Ocean). Any idea of what is going on?

Update: Now, after configuring the /var/www/ghost/config.production.json, when I try to register a new member I receive this message: Please enter a valid email address!

Do you think that the error comes because my blog is in: mydomain.org and I configured a subdomain: newsletter.mydomain.org?

Thanks for helping out!

There’s no reason to config a subdomain for newsletters, rather use newsletter@domain.com to keep things simple.

Using a subdomain for bulk email is a good idea, that’s one of the reasons there are separate configs for the system emails and newsletter emails.

If you use a subdomain for your bulk email then you gain some protection for your sender score/reputation on your parent domain. Generally you want to keep your parent domain strictly for transactional email which will have high engagement so that your general/transactional emails do not end up in peoples spam folders due to potential low engagement from bulk emailing.

1 Like

Thanks for the answers @Kevin and @dsecareanu, now seems that the emails are not going to spam anymore, but in the Ghost panel I see “noreply@mydomain.org” and the Mailgun domain is “newsletter.mydomain.org”. Is that correct?

The most important issue now is that I’m not able to find why the subscription box is not working and I receive all the time the same message: “Please enter a valid email address!”

Any ideas?

I am using latest version of Ghost. My Labs options has Members area where I can configure Email Settings.
Why do I need to modify config.production.json file manually then? What is the purpose of Email settings in Labs?

You’re right @Kevin, my apologies, it helps to use an email subdomain for marketing emails, especially if you run the risk of lowering your main domain reputation with the marketing content.

I was rather looking at the simpler solution as subdomains on the same DO droplet with the same maybe poor reputation IP doesn’t seem to help much (as emails still end up in spam). Rather go through the cost of having a dedicated IP address and clean its reputation as I think that part is more important than the subdomain extra protection.

The Mailgun configuration under the Members>Email Settings area is only for bulk email newsletters sent to members when you publish posts with the “Send email” toggle on.

The config.production.json email configuration is for any transactional email that Ghost sends, eg. Staff invites, forgotten password, member signin/signup emails, etc. This doesn’t have to be configured to use Mailgun but it should be set up to use a proper transactional email service if you want to get high deliverability.

@Ascaso I’m in a similar situation, did you make it work?

Where did you change the “from address” from mydomain.com to newsletter.mydomain.com? to handle the bulk email newsletter side of email sending.

I’d like to keep noreply@mydomain.com for transactional emails and only change the from email for bulk newsletter emails to newsletter.mydomain.com , unsure where to do change for the bulk newsletter setup.

Hi @Kevin.

Since the Mailgun configuration under Members>Email Settings area is only for bulk email newsletters, how can I change the “from address” domain from mydomain.com to newsletter.mydomain.com ?

I’m aware of this: https://ghost.org/docs/concepts/config/#from-address

And that I can change the from address, but I’d like to keep noreply@mydomain.com for transactional emails and only change the from email for bulk newsletter emails to newsletter.mydomain.com , unsure where to do change for the bulk newsletter setup.

Would it change if I change the Mailgun domain?


Thanks in advance.

hey guys - i’m having similar issues. In this case I go to the member sign up add the email and the loading signal just spins forever more and nothing happens.

I have changed the ghost config to add smtp email for mailgun, but it doesn’t appear to work right now.

Server is Ubuntu 18.04, ghost install in docker behind nginx reverse proxy & letsencrypt hosted in Oracle Cloud.

All other emails seem to work so I’m a bit stumped, had the same issues across a few blogs

1 Like

These instructions solved this issue for me more recently fwiw, summary here: Help with email subs via mailgun

Just want to add something that might help others. Mailgun told me to use port “587”, so I used this when entering smtp info in config.production.json. But every time I entered an email in the subscribe field on my blog, it would tell me to enter a valid email address. As soon as I changed the port to “465” everything worked!

1 Like

Hello,
can you please give more details? I did everything but still SMTP does not work for me :frowning:

This is vital! The example in the offical Ghost docs use port 587 but this didn’t work for me. Using port 465 fixed everything

Huge thanks!

@Kevin is it possible to create a Loom with all of the above. Noob-proof, I mean.

Me for example I’m happy that I installed Ghost a Digital Ocean droplet while rerouting through Cloudflare.

Now I’m attempting to set-up Mailgun (added the TXT, CNAME and MX in Digital Ocean and awaiting the verification of the DNS records -> 24h have passed, so maybe I’ve messed up.
Did I had to add the DNS records to Cloudflare or to Digital Ocean?

From there I don’t have a clue what to do. No idea how and with which program to change the config.production.json file etc.

Is there a video out there already about this? I guess it would help out a lot of people.

Ok, got it done. Needed to go through the steps on Cloudflare. not DO. Still can’t send to Members after posting though.

I will be in same boat soon - so let me know if you get a fix Matviee - hope you do!I have same setup with Cloudflare / DO

When I try to signup it gives the error " Failed to sign up, please try again Members "
try here : https://neurologicaldisorders.co
please help me man

I’m also having this issue here: https://copysmith.ai/resources/newsletter

I’ve followed the configuration in my local files, and have also set Mailgun settings via the UI:

  "mail": {
"transport": "SMTP",
"options": {
  "service": "Mailgun",
  "host": "smtp.mailgun.org",
  "port": 465,
  "secureConnection": true,
  "auth": {
    "user": "postmaster@blog.copysmith.ai",
    "pass": "98e6194a0dfdc8317e63cb2dcb2fa3cd-4879ff27-7e8077da"
  }
}

}

any luck with changing secureConnection to false?