mailgun_logo.png

Mailgun provides powerful APIs that you can use to send, receive, and track emails. You can integrate Mailgun with Blueshift to send emails to your customers as a part of a campaign journey.

Tracked events

With Mailgun integration, we can track the following: 

  • Sends
  • Impressions
  • Unique impressions
  • Clicks
  • Unique clicks
  • Visits
  • Orders
  • Activations
  • Delivered (sent and not bounced)
  • Revenue
  • Bounces
  • Spam reports
  • Unsubscribes

Prerequisites

Before you can set up integration with Blueshift, you must have your Mailgun account set up.

First add your sender domain in the Mailgun account and then get your account's API key. If you already have the API key, you can directly proceed to the step where you add the Mailgun adapter in Blueshift

Add your sending domain in Mailgun

  1. You must add a sending domain in Mailgun. On the Add your domain page, specify the sender sub-domain. There are other options on this page that you can use to configure your setup. For more information, see the Mailgun documentation for adding a domain.
  2. You must also update the DNS entries with your DNS provider, and verify your sub-domain with Mailgun. For more information, see the Mailgun documentation for adding DNS Records to your Hosting Provider.  

Get the API key

If the sending domain is set up and verified, you can get the API key of your Mailgun account.

In the top-right corner of the Mailgun Control Panel, click your Profile Menu to expand the drop-down list of options. Click API Security.

For more information, see the Authentication section of the Mailgun API reference documentation and Maigun documentation for Adding API keys

Primary account API key

When you sign up for Mailgun, a primary account API key is generated. This key is used for receiving events from Mailgun like delivered, spam, bounce, and so on.

Use this key as the Webhook API key when you set up an adapter in Blueshift.

Domain Sending key

The domain sending key is the sending key is used when sending emails. Use this key as the Sending API key when you set up an adapter in Blueshift.

Get the CNAME value of your sending domain

Add the CNAME value of your sending domain when you create an adapter in Blueshift if you want to use Mailgun's click tracking. Blueshift does not use Mailgun's tracking data in the platform.

You can find the CNAME value in the domain settings. To access domain settings in your Mailgun account:

  1. Click Sending > Domains on the left panel.
  2. Click on the domain in the right panel.
  3. On the left panel, click Domain settings
  4. In the Domain settings, select the DNS records tab. The CNAME value is available under this tab. 

Set up integration

After you have the Mailgun API key ready, complete the following steps to add the Mailgun adapter in Blueshift.

  1. Sign in to the Blueshift app, and click App Hub in the left navigation menu.
  2. Go to All Apps, search for, and select Mailgun.
  3. You can also go to Email Apps and select Mailgun.
  4. Click Configure to view all the configured adapters.
  5. Click +ADAPTER to add an adapter.
  6. Add a Name for the adapter.  If you have multiple adapters, the adapter name helps you to identify the integration.
  7. Provide the following details for integration:
     

    mailgun_adapter_dec23.png

    Alias name Specify an alias for the adapter. This is for identification purpose only. 
    Sending API Key Provide the Domain Sending API key that you get from your Mailgun account.
    Webhook API Key Provide the Primary Account API key that you get from your Mailgun account.
    Sending domain Specify the sending domain that you add in Blueshift.
    From Name

    Specify a name that is displayed on the From field of an email. 

    You can override this value in the trigger that you create for a campaign. 

    From Address

    Specify the sender's email address.

    You can override this value in the trigger that you create for a campaign. 

    Ensure that domain that you use for this address is the same as the domain that you add in Mailgun. For example, if you add default.subdomain.com in Mailgun, the From Address value should be someone@default.subdomain.com where someone can be anyone. 

    Reply To Address Specify the email address to which a customer can reply. 
    BCC

    Specify the email addresses of people who should receive the copy of the email that your customers receive. Use comma to provide multiple email addresses.

    For example:

    johndoe@blueshift.com,janedoe@blueshift.com,doejohn@blueshift.com

    By default, our platform sends a copy of the email to the email addresses that you specify. If you want to include the email addresses in the BCC field of the email, drop us an email on support@blueshift.com.

    Whitelabel host name (CNAME)

    Specify the domain that will be used to mask links for tracking purposes.

    The domain must be setup as a CNAME record in your DNS. The CNAME must map to either links.getblueshift.com (US or Rest of the world) or links.eu.blueshift.com (EU region) based on your Blueshift login region. SSL is required for any link masking domains. If you are unsure which domain to setup in your DNS please contact your CSM or support@getblueshift.com.

    • If you do not specify a value here, and you have set up Whitelabeling for your account, then the domain setup in Account Settings will be used.
    • If you have not set up Whitelabeling for your account and you do not specify a value here, the Blueshift domain will be used for tracking.
  8. Select the Bypass Mailgun's suppression list option to send an email to all customers who qualify for a campaign regardless of their subscription status in Blueshift.
    Note: Consider the following points about this option:
    • If a customer's subscription status changes in Blueshift, this status is not synced with Mailgun.
    • Blueshift sends the email to Mailgun, but Mailgun decides whether to send it to the customer depending on their subscription status in Mailgun.
  9. Click Save to add the adapter.

Next steps

  1. Create an Email template for your messages.
  2. In your campaign journey, add an Email trigger. On the Email tab of the trigger, go to Send Settings and specify Mailgun as the App and select the adapter that you just created.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.