Getting Your MailGun API Keys and Secrets Setup

To use mailgun in your application you will need to create a mailgun account and get an API key. This API key is a way for mailgun to verify that the app trying to talk to mailgun servers is truly your application, and not an imposter. An API Key is your application's MailGun Drivers License. Getting the API is a kind of pain (but not as bad as going to the DMV). See the below post to get started:

Getting Started with MailGun

Go to MailGun.com and click the signup button in the top-right corner:

mailgun1.png

Fill in the signup form and click “Create Account”:

mailgun2.png

The next page may look a little confusing but just scroll down to the bottom and click “Continue to Your Control Panel”:

mailgun3.png

(you may need to verify your email, or verify your account with a phone text message code) But once you get into your MailGun account, you should see a page like the below:

mailgun4.png

Click “Domains” from the top navigation (to the left on the top navigation). You should see a page like the below (my domains are omitted with black lines):

mailgun5.png

Click “Add New Domain” on the top-ish left side (highlighted green).

Fill in the “Domain Name” input field with the following:

mail + .YourWebsiteName.com

So if my website domain is www.YourWebsiteName.com, I will put:

mail.YourWebsiteName.com

You will still be able to send emails from your normal domain like: [email protected]

mailgun6.png

Once you click “Add Domain” you should land on this page.

mailgun7.png

 

At this point, you are almost done! You don’t have to do anything with this page now. You can get help from your developer. Next thing to do is to click the “Domains” tab again at the top of the page:

mailgun8.png

You will see your new domain in the list now:

mailgun9.png

Click on your domain to get to this page:

mailgun10.png

You want to get the Default Password, API Base URL, and API Key and send those to your developer.

**MAKE SURE YOU KEEP THESE PRIVATE.

You don’t want these getting loose on the internet or google. You can find them here: 

mailgun11.png

That is it! You’ve (almost) set up your mailgun account. You’ll need to also verify your domain name. But that is another story. Ask your developer.