How to Set Up Mailgun for Your CRM

Setting Up Mailgun for Your CRM

This guide will walk you through the process of configuring Mailgun, an email delivery service, to work with your CRM. You will learn how to create a Mailgun account, add a sending domain, configure the necessary DNS records, and send a test email to confirm the setup is successful.

Create a Mailgun Account

Begin by visiting the Mailgun website to sign up for a new account. After completing the signup form, check the email inbox you provided for a verification message from Mailgun. Click the link in that email to confirm your account.

Add a Sending Domain

Once logged into your Mailgun dashboard, navigate to the Sending section and select the option to add a new domain. You will need to decide whether to use your main domain (e.g., yourcompany.com) or a subdomain (e.g., mail.yourcompany.com).

  • Main Domain: Use this option only if the domain is not already configured with another email service like Google Workspace.
  • Subdomain: This is often the recommended and safer choice. You can create any subdomain you prefer.

Important: When adding the domain, ensure you select the US region, not the EU region.

Configure DNS Records

After adding your domain, Mailgun will provide you with a list of DNS records that need to be published. You must add these records to your domain's DNS settings, which are managed by your domain provider (the company where you registered your domain).

If you are unsure who your DNS provider is, you can use a tool like MXToolbox. Enter your domain name (without 'http://') into the search, and the results will indicate which company hosts your DNS. Once you know your provider, log into their dashboard to add the required TXT, CNAME, and MX records. The process for adding records is generally similar across different providers.

Get Your API Key and Send a Test

After adding the DNS records, you must wait for them to be verified by Mailgun. This process, called DNS propagation, can take from a few minutes up to 48 hours. Once Mailgun confirms the records are active, you can retrieve your API key from the Mailgun dashboard.

To finalize the setup, use this API key to send a test email from within your CRM to ensure everything is working correctly.

Frequently Asked Questions

Should I use my main domain or a subdomain?
Using a subdomain is typically the safer option to avoid conflicts with existing email services on your main domain.

Why is it important to select the US region?
The region determines which Mailgun servers will handle your email. For this CRM integration, you must select the US region.

How long does DNS verification take?
Verification times vary, but it is usually complete within an hour, though it can sometimes take longer.

What should I do if my test email fails?
First, confirm that all DNS records show as verified in your Mailgun dashboard and that the API key has been entered correctly into your CRM.