Owning your domain is empowering, but setting up email on that domain can be daunting. In this guide, we’ll walk you through setting up a free email service for your domain, enabling you to send and receive emails at no cost using the free-tier services of Cloudflare and Mailjet.

Introduction

Owning your domain is a thing, setting up email on your domain can be another. In this guide, we will walk you through setting up a free email service for your own domain, utilizing the free-tier services of both Cloudflare and Mailjet.

Prerequisites

Before we begin, make sure you have the following:

  • A domain managed by Cloudflare with access to Cloudflare Email Routing.
  • A Mailjet account.
  • A public email account (e.g., Gmail, Hotmail, Outlook) for sending and receiving emails.
  • Note: Some email providers may not display messages sent from the same address, so you may need different addresses for sending and receiving emails, especially during the verification process.

Setup

Cloudflare Email Routing for Email Receiving

  1. Route emails sent to your domain to your free email provider (e.g., Gmail, Outlook) following the Cloudflare Email Routing docs. Verify the address by checking your inbox.
  2. Set up the TXT record for DMARC in your domain’s email security records. You can find it under your Cloudflare account by navigating to https://dash.cloudflare.com///email/dmarc-management/dns. Replace / with your own.
  3. Create a new DNS TXT record for SPF to ensure emails sent from Mailjet are allowed to send on behalf of your domain. Use the following SPF record:
   "v=spf1 include:spf.mailjet.com include:_spf.mx.cloudflare.net ~all"
  1. Test the email receiving by sending an email to your address. For example, send an email from your personal account (e.g., [email protected]) to your domain-based address (e.g., [email protected]), which is forwarded to your personal Gmail account.

MailJet as SMTP Relay for Email Sending

  1. Validate your domain for sending emails using Mailjet by following their guide. Ensure you use the DNS validation method and set up the required DNS TXT records.
  2. Set up the DNS TXT record for DKIM using the values provided by Mailjet.
  3. Generate the SMTP relay settings and credentials from your Mailjet account. Store the credentials securely, preferably in a secret manager, as they will only be shown once.
  4. In Gmail, navigate to account settings (https://mail.google.com/mail/u/0/#settings/accounts), then go to Send mail as -> Add another email address. Enter your name and domain-based email address.
  5. In the SMTP server settings, enter “in-v3.mailjet.com” as the server, use port 587, and enter your MailJet API Key as the username and Mailjet Secret Key as the password. Use recommended settings for TLS over SSL.
  6. Save the changes and test sending an email from your domain-based address (e.g., [email protected]) to your personal email (e.g., [email protected]).

Conclusion

Congratulations! You have successfully configured email for your domain using Cloudflare Email Routing and Mailjet. Enjoy up to 200 free daily email sends with up to 100 alternate addresses via Mailjet, along with 200 email routing rules and addresses for email receiving using Cloudflare Email Routing.

References

  • Mailjet Domain Validation Guide: [Link]
  • Mailjet SMTP Relay Configuration: [Link]
  • Cloudflare Email Routing Documentation: [Link]

By following the steps outlined in this guide, you can effectively manage email communication for your domain without incurring any additional costs. We hope this tutorial proves useful for you and helps streamline your email setup process.

By 9M2PJU

An amateur radio operator, Royal Signals veteran, jack of all trades and master of none.

Leave a Reply

Your email address will not be published. Required fields are marked *