Setting up a new domain in Mailgun is a critical step in ensuring your emails are delivered securely and efficiently. This guide will walk you through the process, from adding a new domain to configuring DNS records, verifying settings, and integrating Mailgun into your account. By following these detailed instructions, you can streamline your email operations and minimize potential issues, allowing for smooth and reliable communication with your clients.
Setting Up a New Domain in Mailgun #
- Access Mailgun and Navigate to Domains: Log into Mailgun, go to the “Sending” tab, and click on “Domains”.
- Add a New Domain: You can use your main domain or a subdomain. For client-specific email addresses, it’s advisable to use a subdomain to keep each client’s email activities separate and secure. For example, you might use something like testemail.yourdomain.net as a subdomain.
- Enter Your Domain/Subdomain: Choose and type in your preferred domain or subdomain, then click “Add Domain”.
Configuring DNS Records #
- Log Into Your Domain Provider: Access your domain provider’s website and navigate to your domain’s DNS settings.
- Add DNS Records: You will need to add various types of DNS records including TXT, MX, and CNAME records. This involves copying details from Mailgun and pasting them into your domain provider’s DNS settings.
- TXT Records: These are used for verification and email security purposes.
- MX Records: These direct your emails to the correct mail server.
- CNAME Record: This is used for tracking email opens and clicks.
Verifying DNS Settings in Mailgun #
- Verify DNS Settings: After adding the DNS records, return to Mailgun and click “Verify DNS Settings”. If it doesn’t verify on the first attempt, try again.
- Domain Settings in Mailgun: Navigate to “Domain Settings” and ensure that tracking options like unsubscribes, clicks, and opens are enabled for better email management.
Completing the Integration #
- Obtain SMTP Credentials from Mailgun: Under “Domain Settings” in Mailgun, find the SMTP credentials section and copy the login email address.
- Configure SMTP in the CRM: In the CRM, go to “Settings”, find “Email Services”, and click “Add Service”. Then, choose the “Other” option to continue.
Enter the following details:
- Provider Name: Enter “Mailgun”.
- SMTP Server: smtp.mailgun.org.
- SMTP Port Number: 587.
- Username and Password: Paste the copied login email address as the username. Reset and copy the password from Mailgun, then paste it into the password field.
- From Email Address: Enter the full email address you wish to send from, ensuring it matches the domain configured in Mailgun.
After entering the required details, click “Save” to finalize the integration.
Troubleshooting Tips #
DNS Verification Issues #
If DNS settings fail to verify in Mailgun, double-check for any spaces or typos in the records you’ve added. It may also take some time for DNS changes to propagate.
Emails Going to Spam #
Ensure that your domain has a solid reputation and that you’re using the correct SMTP settings. Utilizing the tracking features in Mailgun can also help manage your email reputation.
Frequently Asked Questions #
Should I use my main domain or a subdomain for Mailgun? #
For client-specific email addresses, it’s advisable to use a subdomain to keep each client’s email activities separate and secure, though you can use your main domain.
What SMTP settings does Mailgun use? #
Use SMTP Server smtp.mailgun.org with port 587, the copied login email address as the username, and the password from Mailgun.
What DNS records do I need to add for Mailgun? #
You need TXT records (verification and security), MX records (mail routing), and a CNAME record (tracking opens and clicks).
Why won’t my DNS settings verify in Mailgun? #
Check for spaces or typos in the records you added, and allow time for DNS changes to propagate before trying again.
What should the From email address match? #
The From email address must match the domain configured in Mailgun to ensure proper delivery.