How to setup Mailgun in WordPress for free
Setting up Mailgun on your WordPress site is very important especially when your site is on a shared hosting plan. Form submissions will often get lost which is a critical issue and a website is not much use if you potential clients cannot contact you!
In order to setup Mailgun to work with your WordPress site you will first need to:
- Create a free Mailgun account – up to 100 emails per day
- Download an WP Mail SMTP
Mailgun Setup
Once you have created your mailgun account you will need to make sure that you are in the ‘US’ domain – only the ‘US domain’ has a free sandbox url.
- Click into the sandbox domain and add the email address which you want the mail to be sent to on the right hand side as shown in the screen.
- Once you have accepted this, your mailgun is setup!

NB: You must setup the Mailgun first as the sandbox url + api key will change based after you have accepted the recipient.
SMTP Setup
Launch the setup wizard, select Mailgun of course as your SMTP provider and input both the API Key and Sandbox url when you get to this page.

These 2 items can be found on the Dashboard screen from Mailgun above. Just select, ‘Setup with API’ and you will be able to create your own API Key.
NB: When pasting the Sandbox domain, make sure to remove the ? at the end !
Step through the rest of the setup wizard, you do not need to premium option. Then you should hopefully see the screen below!
If you do not, then there is a debugging option on the SMTP plugin, it will give you the error message and allow you to debug.
