How to avoid confirmation email going to spam when using gmail for business and Cloudflare?

hi, I set up a self-hosted blog with ghost on digital ocean. everything works fine but emails going to spam. I have set it to ghost.silviogulizia.com and my domain is managed by cloudflare. my domain uses a gmail for business, and I set mx for this in cloudflare. my emails (subscription confirmation request) are going to spam because of dkim missing in headers. I duplicated the mx and added them for ghost.silviogulizia.com.

now, reading the documentation seems I have to use mailgun or amazon ses, but since I am getting email I assume I can use gmail too.
what I have to set to avoid spam?

Afaik you can’t simply use Gmail SMTP.

I suggest you to configure Mailgun. It’s free for reasonable amount of emails, and has all necessary dkim/spf setttings so your emails won’t get into spam.

I see. Is it somehow mandatory to use Mailgun?

You can use any SMTP provider here, just make sure they provide DKIM/SPF records so your emails won’t fall into spam.

Mailgun is convenient option if you already use it for Members functionality.

Actually, it’s not clear to me the whole email thing. Right after setting up the installation, I have confirmation mail sent by noreply@mydomain. Those emails go to spam, not sure if because of my dna setup (I am using a subdomain and I just duplicated Google Mx from my domain) or if it’s because I didn’t setup anything inside ghost config file. Then we have members/newsletter that I just realized requires Mailgun.

Should I setup ghost to use gmail to send confirmation emails? And then mailgun for members? Can I / does it make sense use only Mailgun for everything (easier?)

For some reasons signup/confirmation/service emails are sent by smtp service while member emails can be only sent via Mailgun.

By default smtp service is configured to use nodemailer and send emails directly from your server. It doesn’t include anti-spam settings by default—that’s why your email went to the spam.

I suggest you to configure Mailgun to send confirmation emails. You can use any other SMTP provider as well. I’m not sure about Gmail, but you can try.

1 Like

Once I setup Mailgun to send mail, can I still get messages at Gmail (or other mail service) and send from it?

Yes, you will be able to get your emails as soon as your DNS MX records are point to Gmail.