We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

Where Can I Find My API Key and SMTP Credentials?

Authentication is required any time you wish to relay messages through our platform. When using our API, you need to use one of your account's API keys (either the Private API Key or the Public Validation Key).

For our SMTP server, you need to use your domain's SMTP credentials.

Note: If the API keys are not visible within your Control Panel, verify your permissions with your account's Admin user.

API Keys

Your Private and Public API keys are located within your Account Settings page and (in our classic UI) the main dashboard page. 

If you're using the classic UI (options across the top, with a silver background), you can use either of the following instructions:

  • Click on the Mailgun logo on the top left corner of the control panel to navigate to the main page.
  • Scroll down to find the API Keys section, both your Private and Public API keys will be located here.
  • Click on the eye icon to make the full API key visible.

Or, the API key can be found under the Account Settings page as well: 

  • Click on your email address to expand the drop-down menu.
  • Select Security from the drop-down list.
  • On the following page under the API Keys section, both your Private and Public API keys will be located here.
  • Click on the eye icon to make the full API key visible.

If you're using the beta UI (options displayed down the left-hand side on a dark column), the API keys are only available under the Settings page. To locate the API keys, use these instructions:

  • Click on Settings on the left-hand side of your the Mailgun dashboard.
  • Select API Security from the menu below on the left-hand side.
  • On the following page, under the API Keys section, you'll see both your Private and Public API keys.
  • Click on the eye icon to make the full API key visible.

SMTP Credentials

Your SMTP credentials are different for each domain you add. You can find your default credentials, and add more, by clicking through to your domain's page in your Domains tab.

If you're using the classic UI (options across the top, with a silver background), you can use either of of the following instructions:

  • Click the Domains tab within your Mailgun Control Panel.
  • On the following page click on your domain's name.
  • Under the Domain Information section, the Default Password for the domain will be visible.
  • To create or edit additional SMTP credentials, click on Manage SMTP Credentials.
    • To create a new SMTP credential, click on New SMTP Credential and enter the SMTP Username, Password, and confirm your password by entering it again.
    • Save the new credential by clicking Create Credential.
    • To update existing credentials, click on the blue cog next to the preferred credential and click Edit Password.
      • Enter the new Password and confirm the password by entering it again.
      • Save the new password by clicking Reset Password.

If you're using the beta UI (options displayed down the left-hand side on a dark column) the SMTP Credentials are not visible and can only be updated. To update your SMTP credentials, use the following instructions:

  • Click on Messages on the left-hand side of your the Mailgun dashboard.
  • Select the specific domain.
  • On the following page click on Settings, then click SMTP Credentials.
  • To update the password click Reset Password.
  • Confirm your password reset by clicking Reset Password in the pop-up.
  • Your SMTP credential's new password will be displayed on the top-right corner within a green pop-up. Save this password by double-clicking on the string and copy+pasting into a safe location, as it will not be revealed again.

What Ports Does Mailgun Support?

Our servers listen on ports 25, 465 (SSL/TLS), 587 (STARTTLS), and 2525.

A few things to note when selecting a port:

  • Some ISPs block or throttle SMTP port 25. We recommend using port 587 instead.
  • Google Compute Engine allows port 2525 for SMTP submission.
  • Mailgun IPs change frequently, we do not recommend setting up firewall restrictions against our IP addresses.
  • See our SMTP documentation in the users manual to learn how to configure the most popular SMTP software and email clients to work with Mailgun.

For a more detailed explanation on ports check out our blog post.

 

If any questions arise, just reach out to our Support team via the Support tab in your Mailgun control panel!

Getting Started Sending Mail Receiving Mail Deliverability & Reputation Email Tracking Troubleshooting
Powered by Zendesk