Mailgun

Mailgun is an email delivery and service, designed for sending, receiving, and tracking emails.

Data integration: Skyvia supports importing data to and from Mailgun, exporting Mailgun data to CSV files, and replicating Mailgun data to relational databases.

Backup: Skyvia Backup does not support Mailgun.

Query: Skyvia Query supports Mailgun.

Establishing Connection

To create a connection to Mailgun, specify your Private API Key and Domain.

Getting Credentials

API Key

To obtain the API Key, perform the following steps.

  1. Go to Mailgun.
  2. Click the user icon and select API Security.

    API Menu

  3. Click Create API Key on the bottom of the page.

    Create API Key

  4. Enter the description and click Create Key

    API Key description

  5. Copy the API Key value and save it somewhere.

    API Key

The API Key is available only once when creating. We recommend saving it in a safe place.

Domain

To get the domain, do the following.

  1. Go to Mailgun.

  2. Click Sending on the left.

    Domain

Creating Connection

To create connection, follow the below steps:

  1. Select API Region from the drop-down list.

    Connection Editor window

  2. Paste your private API Key.
  3. Specify your domain.

Connector Specifics

Object Peculiarities

Events* Objects

There are nine types of events in Mailgun. There is a separate object for each event type in our Mailgun connector: Events_Accepted, Events_Delivered, Events_Failed, Events_Opened, Events_Unsubscribed, Events_stored, Events_Rejected, Events_Clicked, Events_Complained.

Skyvia supports filters by the Timestamp field using <, and >= operators and the Headers_To, Headers_From, Headers_Subject, Recipient fields using the = operator.

Incremental Replication and Synchronization

Skyvia supports Replication with Incremental Updates for the following Mailgun objects: Complaints, Domains, MailingLists, Routes, Templates, Unsubscribes, Whitelists.

Skyvia supports Synchronization for the MailingLists, Routes, and Templates objects.

DML Operations Support

Skyvia supports DML operations for such Mailgun objects:

Operation Object
INSERT, UPDATE, DELETE IPPools, ListMembers, MailingLists, Routes, Templates
INSERT, DELETE Bounces, Compliants, Domains, Unsubscribes, Whitelists
UPDATE, DELETE Tags
INSERT SeedLists
DELETE SeedResults

Stored Procedures

Skyvia represents part of the supported Mailgun features as stored procedures. You can call a stored procedure, for example, as a text of the command in the ExecuteCommand action in a Target component of a Data Flow or in Query.

SendMessage

Use the following command to send a message.

call SendMessage(:from, :to, :text, :html, :cc, :bcc, :subject, :amp-html, :template)

Parameter Description
From Email address for From header
To Email address of the recipient(s). Example: “Bob bob@host.com”. Use commas to separate multiple recipients
Cc Email address of the recipient(s) who receive the message copy. Use commas to separate multiple recipients
Bcc Email address of the recipient(s) who receive the hidden message copy. Use commas to separate multiple recipients
Subject Message subject
Text Body of the message (text version)
Html Body of the message (HTML version)
Amp-html AMP part of the message. Please follow Google guidelines to compose and send AMP emails
Template Message template name, if needed

Supported Actions

Skyvia supports all the common actions for Mailgun.