infra/cloudflare


Email with custom domain

If you are using Cloudflare’s custom email, it is possible to send email using Gmail’s SMTP.

  1. Make sure your Google account has 2FA
  2. Create an App Password for using the SMTP server
  3. Add the Cloudflare-routed email address: In Gmail go to Settings -> Accounts -> Send email as -> Add another email address
  4. Config the SMTP server smtp.gmail.com, your email as the username, and the App Password created in (2)
  5. Update the SPF config in your domain to include google.com. v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all

References