Introduction
This article provides the steps required to connect Gravity SMTP on your website with Mailgun service by Sinch using the included Mailgun Integration.
Mailgun offers a free service when sending up to about 1,000 emails per month, which can make it a low commitment option for small websites with only modest outgoing email needs. They offer pay-as-you-go pricing or preset plans for sites handling a larger number of messages.

Steps To Connect
To allow Gravity SMTP to send messages from your website via the Mailgun service, you will need to complete the following steps:
- Create a Sinch Mailgun account (as required for the plan you are using – see also flex plan).
- Add and verify a sending domain in Mailgun.
Adding a sending domain to your Mailgun account is required in order to prove ownership of the email address and domain that outgoing messages will be representing. You must complete this step before configuring the Mailgun Integration within Gravity SMTP. Refer to this help guide for instructions on how to complete this step. - Obtain your Mailgun API key.
This will be required in settings to create the link between Mailgun and your website via Gravity SMTP. Refer to this help guide for instructions on how to find that API key in your Mailgun account. - Complete the Gravity SMTP Settings screen.
Go to Gravity SMTP → Settings → Integrations and click the + icon. From the list of available integrations, search and select Mailgun. This will add it to your integrations and display its settings fields, which you’ll need to complete to finish setup. See this help guide for a description of these settings. - Click Save Changes button.
After saving, you’ll return to the Settings card page, where the new integration card will appear in the list. You can then test using the Gravity SMTP “Send a Test” Tool.
Once the integration is set up, it will be ready for use. You can verify the connection with a test email and send it through Mailgun when needed.