Search documentation

Search for a topic, a control, or an event type.

    Docs / Workflows / Integrations / Mailgun

    Mailgun

    Send email through a configured Mailgun domain and receive delivery status.

    What you can do

    Each Mailgun integration’s page in OAIZ shows these uses, with its events and its read and write actions, under What you can do with Mailgun.

    Order confirmations
    Send an order confirmation for each new order.
    Bounces
    Update a customer’s details when an email hard-bounces.
    Unsubscribes
    Record unsubscribes so you stop emailing those people.

    Connection scope

    The connection has a sending domain, approved sender addresses and a default sender. senderEmail must match an approved address or remain empty to use the default. Credentials apply to this configured sending service.

    Connecting

    The connection asks for Mailgun target JSON and Mailgun credentials JSON. The target names an existing sending domain, its US or EU region, approved sender addresses and a default sender. Use a Mailgun Domain Sending Key for that domain as apiKey.

    Mailgun target JSON
    {
      "domain": "mail.example.com",
      "region": "eu",
      "approvedSenders": [
        {
          "email": "hello@example.com",
          "name": "Example"
        }
      ],
      "defaultSenderEmail": "hello@example.com"
    }
    Mailgun credentials JSON
    {
      "apiKey": "YOUR_DOMAIN_SENDING_KEY"
    }

    For delivery events, also include managementApiKey with an account-level key that can manage domain webhooks. OAIZ uses it to register delivery callbacks and obtain the account’s HTTP webhook signing key. An existing signing key can be supplied as signingKey.

    Write actions

    Send Email
    Send a message through the configured domain using an approved sender. The result confirms that Mailgun accepted it for delivery.

    Events

    When delivery events are enabled, the connection reports delivery to the recipient’s mail server, temporary and permanent bounces, spam complaints and unsubscribes. Delivery to the server does not prove the person read the email.