Introduction
Channels
Templates
Contacts
Messages
API
public
beta
Docs Contact Login

mailgun Mailgun

Mailgun is one of the leading Email Service Provider acquired by Rackspace.

Signup for a free trial: https://mailgun.com/

Features

Webhooks events Common ESP features
Delivered CC addresses
Dropped BCC addresses
Soft bounced ReplyTo address
Opened Tags / Categories
Clicked Test / Sandbox mode
Unsubscribed Campaigns allowed
Spam
Mailgun specific features
Disable DKIM signature on the fly Enables/disables DKIM signatures on per-message basis.
Require TLS Requires the message only be sent over a TLS connection. If a TLS connection can not be established, Mailgun will not deliver the message.

Connect Mailgun

You need your API key and your "API base URL" to connect Mailgun with Notifuse.

Login into your Mailgun account and click the "Domains" tab, then select the domain you want to connect on Notifuse. Your API key and "API base URL" are available under the "Domain information" section.

Connect Mailgun's webhooks

  1. Grab your Notifuse webhooks URL from your Mailgun's channel settings.
  2. Connect to your Mailgun dashboard and go to "Webhooks".
  3. Select the right "Domain" you want to setup in the select box on the left.
  4. For each events, past your Notifuse webhooks URL into the "URL" input by clicking the blue cog wheel icon.
  5. Save your settings by clicking the "Set Webhook URL" button.

Available settings

The Mailgun settings are defined at the template level from the Notifuse interface when you create/update a template.

If you don't plan to create your templates via API, or overwrite some settings at the last minute when you send a message (via API), you can skip the following table.

However it can be useful to overwrite some settings when you send a message from the API, like the email parameter to route an email to the secondary email address of the recipient (imagine he forgot his password and cannot reach his primary mailbox).

The settings you can overwrite when you send a message via API are marked in the Available in column.
Parameter Expected value Available in Description
email
required
string contact, message Email address of the recipient. Has to exist in the recipients contact profiles.
from
required
string template, message Email address of the sender.
name
required
string template, message Sender name.
subject
required
string template, message Subject of your email. Templating markup allowed.
text
required if no html
string template Text content of your email. Templating markup allowed.
textMacro
optional
string template Id of the page of macros used in the text content of your email.
html
required if no text
string template HTML content of your email. Templating markup allowed.
htmlMacro
optional
string template Id of the page of macros used in the html content of your email.
testData
optional
object template JSON object of fake data used to test your templates.
cc
optional
array template, message Array of email addresses to CC.
bcc
optional
array template, message Array of email addresses to BCC.
clickTracking
optional
string: yes | no | htmlOnly template, message Enable click tracking via webhooks.
openTracking
optional
boolean template, message Enable open tracking via webhooks.
requireTls
optional
boolean template, message Require TLS.
skipVerification
optional
boolean template, message Skip the verification of the TLS cert.
tags
optional
array of strings template, message Array of tags for your Mailgun dashboard.
dkim
optional
boolean message Enables/disables DKIM signatures on per-message basis.
testMode
optional
boolean connect, message Enable test / sandbox mode.
headers
optional
object (key: value) message Append custom MIME headers to the message.

Next: How to use the templates ยป