Mailgun is the email automation engine trusted by over millions of websites and application developers for sending, receiving and tracking emails.
StoryChief is a Content Marketing Software that helps entrepreneurs, SEO marketers, and editorial teams expand their reach.
StoryChief IntegrationsMailgun + StoryChief
Create or Update Contact to StoryChief from New Unsubscriber in Mailgun Read More...It's easy to connect Mailgun + StoryChief without coding knowledge. Start creating your own business flow.
Triggers whenever a new subscriber is added.
Triggers when a current subscriber unsubscribed.
Triggers when a new contact is added to a list.
Triggers when a contact is added or updated in a list.
Triggers when a story is published.
Triggers when a story is published or updated.
Creates a new draft story.
Creates a new user inside your account.
Creates a new contact inside a list or updates it if it already exists.
(30 seconds)
(10 seconds)
(30 seconds)
(10 seconds)
(2 minutes)
Mailgun is a service that handles “email as a service”. The user can send and receive emails through the API of Mailgun. The user can also retrieve data such as “logs”, “subscriptions”, and “databases” through the API of Mailgun.
StoryChief is an online service that allows users to create and publish digital stories. They have their own API so that users can integrate StoryChief service into their applications.
In this article, I will describe integration of Mailgun and StoryChief by showing two examples on how to use Mailgun API to send email messages and retrieve StoryChief API to retrieve stories.
The first example shows how to use Mailgun API to send mail messages. This example does not require user authentication because it does not need to authenticate itself with StoryChief.
The second example uses OAuth authentication to authenticate with StoryChief. It requires the user to authorize the application by using a special URL. After the user authorizes, the application is authorized to access StoryChief API. The application can communicate with StoryChief API using the authorization token received from StoryChief. In this example, the application knows your personal information such as your username. You all should be careful to prevent this app from leaking your data or sending fake emails to people you know.
Example 1. Mailgun API without Personal Authentication
To send mails using Mailgun API, first create an account on https://www.mailgun.com/signup/. Click on Documentation link and scrpl down to find list of APIs:
Click on SMTP API and you will see the general interface for SMTP API (as shown below. Use the information in this site and try to find specific information about SMTP API such as how to send email messages (right side of page. and how to retrieve lists of sent mails (bottom of page):
Use PHP for this example (and for other examples. Here is the code for sending mails using Mailgun SMTP API:
<?php
//get Session ID from Mailgun website
//create array of info and pass it to Mailgun function
$info = array();
$info['to'] = '[email protected]'; //destination email address
$info['from'] = '[email protected]'; //sender's email address
$info['subject'] = 'Hellow World!'; //message subject line
$info['text'] = 'Hello World!'; //message body
$info['html'] = '<b>Hello World!</b>'; //message body HTML
$info['headers'] = array( //additional headers if you want
'X-Mailgun-Key' => '<a rel="nofollow" href="http://api.mailgun.net/signup/XXXXXXX" target="_blank">YOUR KEY</a>',
'Content-Type' => 'text/plain; charset=UTF-8',
);
//use Mailgun function to send email
$result = mailgun_mail($info);
if($result === false. { //check result status
echo "Mail sending failed";
} else { //to see message details, go to Mailgun website
echo "Sending mail successfully"; //message details are available at URL in $result like http://api.mailgun.net/v3/XXXXXX/messages/XXXXXX/XXXXXX
The process to integrate Mailgun and StoryChief may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.