Connecting Mailgun to your Onepage project allows you to send professional, branded emails directly from your own domain in Onepage. By using a dedicated email service provider, you ensure higher deliverability rates and build stronger trust with your recipients. This guide will walk you through the preparation in Mailgun and the final integration within Onepage.
📌 Please note: The following steps and screenshots reflect the tool’s interface at the time this article was created. Interfaces or labels may have changed since then. If you notice any differences, we recommend checking the current instructions in the tool, visiting the provider’s help center, or contacting their support team.
Mailgun Preparations
Step 1: Register or log in to Mailgun
Visit mailgun.com to create a new account or log in to your existing dashboard.
Step 2: Select the correct region
Before making changes, ensure you are in the correct data region (EU or US). You can usually verify this via the URL or the region switcher in your account settings.
Step 3: Add your sending domain
In the left-hand menu, navigate to Send > Domains and click the "Add New Domain" button.
Step 4: Enter domain details and region
Enter the domain you wish to use for sending. Again, make sure to select the correct domain region (EU or US) as this determines which API endpoint Onepage will need to communicate with.
Step 5: Verify your domain with DNS records
On the next page, Mailgun will provide several DNS records. Make sure to add the sending records. Other records are optional. Here is a short overview:
Sending Records (2 TXT records): These are essential for the integration to work.
Authentication Records (DMARC): These are highly recommended to prevent your emails from ending up in spam.
Receiving and Tracking Records: These are optional.
📌 Please note: If your root domain is connected to Onepage via Nameservers, you must add these DNS records directly within Onepage. If your domain is managed elsewhere, add them at your domain provider's dashboard.
Step 6: Check Domain Status
After adding the necessary DNS records, click "Check Status" in the top right of Mailgun to verify they are active. Keep in mind that some systems require a few minutes to propagate the new records. If the first check was unsuccessful, simply wait a few minutes and try again.
Step 7: Generate and copy your Sending Key
In the left menu, go to Send > Domain Settings > Sending Keys. Click to add a new sending key. Copy this key immediately, as it will only be shown to you once. You will need it for the Onepage setup.
📌 Please note: Alternatively, you can also use your primary Mailgun Account API Key, though a specific Sending Key is often more secure.
Onepage Setup
Step 1: Open email template settings
Log in to Onepage, select your project, and click on the "Emails" tab.
Click on "Connect custom sender" and select "Mailgun".
Step 2: Enter your credentials
Fill out all the required fields:
Sender: The email address from which the messages will be sent.
From name: The name your recipients will see.
Domain name: Enter the exact domain you verified in Mailgun.
API Key: Paste the Sending Key (or Account API Key) you copied in the previous steps.
Step 3: Select the API Region
Choose between the US or EU.
⚠️ Important: This region must match the one you selected in Mailgun during the domain setup. If they do not match, the connection will fail and your emails will not be sent.
🎉 Congratulations! You have connected a Mailgun custom sender and can now add it to your email templates.
Frequently asked questions (FAQ)
Why is my domain status still "Unverified" in Mailgun?
Why is my domain status still "Unverified" in Mailgun?
DNS changes can sometimes take up to 24–48 hours to propagate globally. If it has been longer than that, double-check that the TXT records were entered exactly as provided by Mailgun without extra spaces.
Can I use a subdomain for Mailgun?
Can I use a subdomain for Mailgun?
Yes, Mailgun actually recommends using a subdomain (e.g., mg.yourdomain.com) to separate your transactional email reputation from your main corporate email.
Where do I find my Account API Key if I lost my Sending Key?
Where do I find my Account API Key if I lost my Sending Key?
You can find your primary API key in Mailgun under Settings > API Keys. However, for security reasons, it is best to generate a new Sending Key if you didn't save the previous one.
Do I need a paid plan at Mailgun?
Do I need a paid plan at Mailgun?
Mailgun offers a free plan, which allows you to connect 1 domain and send a limited number of emails per day. For more emails and features, you will need to purchase a paid plan. Please check the Mailgun pricing page.
Do I need a paid plan at Onepage?
Do I need a paid plan at Onepage?
The custom sender feature is available in the Advanced plan and higher. Please check our pricing table.
💡Do you have any feedback concerning this article? Please let us know through our live chat or at support@onepage.io, so we may keep it up to date. Thank you! 🙂









