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

Hey guys, I’m running my blog https://uklad.vc on Ghost
It was Ghost 2.5 yesterday, just updated to 3.1.0 to use paid membership feature with Stripe.
I’ve setup Mailgun with validated domain.

I’ve put Mailgun private, domain region (US) and domain itself (again, validated successfully in Mailgun).

I’m running my ghost blog on Digital Ocean $5/mo droplet.

  1. Subscription form not working - it shows, I’m entering my email, pressing “Subscribe” button and nothing happens - no email sent

btw, sending email from CLI (curl) works smooth.

  1. So I’m still not seeing even myself in “Members” area of my ghost admin panel

Did anyone encounter such issue?
Maybe it’s because my $5/mo droplet is small/low performance?
Or should I activate some background daemon service in Ghost CLI?

p.s. Have setup Stripe successfully as well with all tokens put.
p.p.s config.production.json is not setup with Mailer, because according to this forum it shouldn’t be setup if I setup Mailgun in Ghost panel UI

Ghost doctor output:

Debug Information:
    OS: Ubuntu, v18.04.1 LTS
    Node Version: v10.17.0
    Ghost Version: 3.1.0
    Ghost-CLI Version: 1.13.1
    Environment: production
    Command: 'ghost doctor'

When trying to subscribe to blog, it responds with “Please enter a valid email address”
https://take.ms/WNQFv

Try to setup config.production.json with a different mailer than the default one “Direct” as DO droplets have some outbound email throttling to prevent spam.

1 Like

It worked!!!

The minute I setup config.production.json with Mailgun SMTP credentials and did “ghost restart” everything started working fine!!!

Thank you bro for the help!

You’re welcome :slight_smile:

1 Like

Hello @dsecareanu, could you tell me how can I access this file from the CLI?

I guess I have the same problem with DO+Mailgun. Everything worked well for a couple of hours, then started to fail. And I received the activation email to spam in a Protonmail when testing.

Extra info: the recipient email is noreply@mydomain.org but the domain I configured for mailgun is newsletter.mydomain.org

Thanks!

From the CLI you just have to edit (vim/nano) config.production.json (is in the root of your Ghost installation).

In this page you also have examples of mail config for various delivery methods.

Thanks @dsecareanu. Yesterday I had access via ssh, but didn’t find it. I’ll try to do it later.

Will this configuration be overwritten with ghost upgrades?

It won’t be overwrite. The file is located in your root folder
Exemple : /var/www/ghost/config.production.json

To prevent that, don’t forget to add an “SPF Record” to your DNS.
Example : v=spf1 include:mailgun.org ~all

2 Likes

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.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)