How to Connect Mailgun

In other to get started with this, you need to first create an account with Mailgun, you need to add your credit card during sign up as per Mailgun's requirement, plus you will get up to 5,000 free emails sending capacity for up to 3 months! You can get started by clicking here.

Then, you would be prompted to verify your Email and Mobile number, after this you can now login and follow these 3 easy steps to complete your SMTP integration:

  1. Add your domain name

  2. Verify your DNS records

  3. Create, copy and integrate Mailgun's API

Add your domain name

From the Mailgun's dashboard, click on Sending and then Domains on the left.

Finally click Add new domain on the screen that follows.

Enter a sub domain and not the main domain of your website, sub domains are very easy to create and if you are not familiar with this, you can get in touch with your hosting support/domain provider (because the steps are quite different from one host to the other ), ,but your host will assist you with a reference document that will guide you on how to create one for your domain. Sub domains looks like this "mail.example.com", where the main domain is "example.com".

Depending on which region your website is hosted, choose US if within the US or outside of US but not within Europe or choose UK if within Europe and set the DKIM like the image below:

Verify your DNS records

On the next screen, Mailgun will show you 4 steps to follow in other to verify your website's DNS record successfully.

The first step displays reference guides for some hosting providers on how to easily verify your website's DNS records, you can click the links to learn if your hosting provider is amongst the list, if not, then we recommend contacting your hosting support for guidance on how to add and verify these text records to your hosting and don't worry, the process is quite easy.

The second step provides you with 2 TXT records that you need for this process, you need to copy and paste them in the appropriate settings area for your hosting.

The third step is about the CNAME record verification, you can ignore this as it is not necessary.

The fourth step shows verification button, click on the Verify DNS Settings and note that it can take 24-48hrs for those changes to propagate. Mailgun will email you to let you know once your domain is verified. But this does not stop from you from finishing up the settings, just go ahead and complete this integration.

Check the status of your domain verification

You will get a message from Mailgun once your domain has been successfully verified but you can still check the status anytime by clicking on Domain and next to your sub domain, an Active status will be shown if it has been verified successfully.

Create, copy and integrate Mailgun's API

This is the last process which is quite easy because we will connect Mailgun by using the available API and a direct link to this API page is available next to the API's field or just click here to visit the page. Click the eye icon to reveal the key.

Then copy the value and paste in the appropriate field inside the YaySMTP settings area. Add your sub domain in the domain field or get it from here. Choose region (UK if your site is hosted within Europe or US if hosted in US or other regions).

Click Save Changes.

Last updated