Gathering Requirements from Mailgun

There are two items you will need to obtain in order to connect your Mailgun account to Sendwithus. You will need to get both an API key and one of your verified Sending Domains.

Finding your API Key

Log into your Mailgun account, and navigate to your account’s API key page. Here you will find your “HTTP webhook signing key” (key-abcde12345abcde) which will be used later to integrate into Sendwithus.

Finding your Sending Domain

In your Mailgun account, on the left panel, navigate to Sending and then select Domains.

Make sure your domains are configured properly before proceeding. Check out Mailgun’s article on how to verify your Sending Domain.

Connect with Sendwithus

  1. Go to Delivery Settings in the Sendwithus dashboard, and click on the Add ESP Account button.
  2. Name the account and select Mailgun or Mailgun EU as the Account Type.
  3. Copy and paste the domain from the steps above into the Domain field and the HTTP webhook signing key into the API Key field.
  4. Click the Save ESP Account and wait for verification.

Enable Sendwithus Analytics in Mailgun

Ensure that you’re in the Sending > Webhooks section for the matching domain in your Mailgun Dashboard. Verify that all webhooks are set to something similar to this URL: “https://hooks.sendwithus.com/webhook/mg/abcde12345/esp_12345abcde”. If everything is the same, Sendwithus is properly integrated with your Mailgun account.

If all of the webhooks aren’t the same, you can update these by creating a new webhook and deleting the old one.

  1. Click on the Add webhook button
  2. Select the Event type
  3. Add the “https://hooks.sendwithus.com/…” URL in the input box and save
  4. Optionally, delete the old webhook

If none of the webhooks are set up, contact support@sendwithus.com to get your analytics URL.

Is your team already using these webhooks internally? Check out our Webhooks FAQ article on how to relay webhooks from Sendwithus.

Add Multiple Sending Domains

If you have multiple sending domains in Mailgun and want to connect these to your Sendwithus account, you can do so by adding each Sending Domain as a new separate ESP. Just enter the unique Sending Domain into the Domain field upon ESP creation.