Use Mailjet’s Webhook Notifications with Segment

What better way to understand your customers but a really powerful Customer Relationship Management (CRM) software? We’ll tell you what – a Customer Data Infrastructure (CDI) software called Segment.

Nowadays, your customers are expecting highly personalized emails and experiences, so a simple CRM might not be enough. Keep reading and find out how you can make life easier with the help of Mailjet and Segment.

What is a CDI?

Our life is becoming more and more dynamic everyday. Brands interact with their customers in almost every channel available, and this creates a lot of challenges, particularly how to keep track of all this data. And customers are expecting more and more from each brand to personalize their whole experience.

At this point, you’re probably thinking your company would benefit from a single tool that can track all interactions from every touchpoint with the clients, ensure that data is accurate, and then automatically pass the data to all other tools where it’s needed to provide seamless customer experiences.

This is where a good CDI comes in handy. With the right CDI, companies can automate the whole process from collecting the data to personalizing the customer experience. Segment is a CDI solution that can simplify your workload and make the customer experience flawless.

What is Segment?

Segment is a customer data hub that helps you connect your apps and integrate them with almost any third-party analytics tools. With all the customer data that you’ve already collected, Segment opens a powerful distribution channel for you.

Segment collects, manages, and sends customer data to analytical and marketing tools. It can combine website and mobile data with data from cloud services like Stripe, Mailjet and Zendesk. Let’s take a closer look at what Segment does as a CDI.

CDIs collect data from every channel where customers engage with your brand or product. It then makes this data available to every tool in an organization where it’s used. This process saves so much time for every developer that has to build integrations to enable different tools to work together.

Segment also takes care of the data governance. This means that it helps companies to protect the integrity of their data, and makes sure that the data is both correct and compliant. This way, you’ll know that everything you need is collected and the information that’s not useful or not compliant with your internal standards will be dropped.

The third role of any CDI is audience management. Essentially, this means that the CDI makes the raw data usable by analyzing and combining all data points and interactions into customer profiles. You will then be able to create all the segments you need using your customer profiles and identify what matters most to each user. From there, you can apply this knowledge to deliver consistent, personalized experiences across all channels.

All features that Segment offers are enormously valuable for high-growth industries like e-commerce and enterprise software that expend a lot of effort on implementing trackers. Segment’s biggest impact is unprecedented distribution for new analytical tools and trackers.

Every developer knows that creating integrations is a pain, and it’s a huge problem for new SaaS products trying to gain traction. Segment is well-positioned to solve this problem and make it extremely easy for businesses (from startups to large enterprises) to mix and match their ideal customer data setup.

For a lot more useful information on how and what else you can use Segment for, check out their blog. In the rest of this article, we will focus on how to use Segment to handle all the notifications you receive from Mailjet’s Webhook Notifications or synchronize your contact list through Segment with Mailjet.

How to use Mailjet’s Webhook Notifications with Segment

Integrating Mailjet with Segment can be done in less than five minutes, and taking those five minutes to set it up will save you so much time in the future. The connection will help you enrich your Mailjet contact lists from Segment sources with new contacts and contact properties, and also receive all events from Mailjet’s Webhook Notifications to data warehouses through Segment.

You will be able to feed all of your transactional and marketing email stats to the 200+ Segment Integration or data warehouses. Then, you can analyze your email growth and engagement metrics alongside your website and landing page visits, or make sure the information about your newsletter unsubscriptions are recorded in your CRM.

We will talk more about the numerous advantages later, but let’s start with how to connect your Mailjet with your Segment.

Set up

To start using Mailjet with Segment, there are five steps you’ll need to follow. Once you have everything covered, we will feed all events to your Segment account and you can link them with other all the other applications that you want. Now that that’s covered, are you ready for Step 1?

Step 1

To start the set up, you’ll need to make sure that you have paid accounts in both Segment and Mailjet. This is mandatory in order for the connection between the two accounts to be established.

Step 2

The next step is to enable the Segment app connection from within your Mailjet account. To do so, you will need to access your account settings page and go to the “Other connectors” page in the “App Connections” tab.


A new page will open, and you’ll have to select “Configure” under the Segment option.


Once you do, a drop-down menu will appear and you will see your “Segment Authentication Key” for connecting your Mailjet account to Segment. The other options shown allow you to receive data from Segment and/or send data to Segment. Copy the Segment Authentication Key provided because you will need it for the next step.

Step 3

Now you need to add the Mailjet integration and source within your Segment account. To do this,go to your Segment account, access the Sources page and click on ‘Add Source’.


You need to find and select Mailjet’s. Once you open it, you have to click on the “Connect” button.


You can name your Source and will be automatically redirected to your newly created Mailjet source.

Step 4

Now you will need to enable the integration by using the Mailjet Segment key (remember the one you copied to your clipboard?). Click on ‘Add Destination’.


Navigate to the Destination catalogue, and once there, find and select Mailjet. On the new page you need to click on “Configure Mailjet”.


Then, you’re going to click on “Confirm Source” and activate it with your Authentication Key. Click on the Authentication Key block and enter the value that you already copied from your Mailjet account.


The last part of this step is to click on “Activate Destination” and voila! You have established the connection between Mailjet and Segment.

Step 5

The last step is to configure the Segment scenarios that you would like to use: receive data from Segment, send data to Segment, or both.

Receiving data from Segment

To activate this option, you need to choose the second option from the first drop down menu.


Select a target contact list from the drop down menu that you want Segment to send contact property data into. You can also create a new contact list at this point by selecting “Create and Use a Segment Master List”. Once you have selected a list, click on the ‘Enable’ button. You are ready to go and your Segment data will be updated in your Mailjet lists so you can create segments at Mailjet or personalize your messages!

There are some details that you need to keep in mind if you will be receiving an array data from Segment. If you have this use case, please visit our documentation.

Activate sending data to Segment

By integrating Mailjet and Segment you can also send your email event data (opens, clicks, bounces, etc.) through Segment to all third-party applications you have connected. This is helpful if you want to put your Mailjet event data alongside other engagement or traction data (for example: Mixpanel, Google Analytics, your CRM, etc.).

To activate “Send data to Segment”, you will need to enter your Segment “Write Key” into the third option of the drop down menu.


Your “Write Key” is provided by Segment and is used to identify Segment’s client account so that the Mailjet system knows where to send data to and where to receive data from.

You can quickly find your Segment Write Key by using this link:[WORKSPACE]/sources/[SOURCE_NAME]/settings/keys

(Where you need to replace [WORKSPACE] and [SOURCE_NAME] with the names of your Segment workspace and source, respectively).

Alternately, you can log into your Segment account, select your workspace and source, then click on ‘Overview’. Copy the key and paste it in the field in your Mailjet account.


Mailjet will then generate an EndPoint URL and populate it on the Triggers page of your account. By default all the events will be activated automatically, but you can always switch off some of them if there is no need for you to receive them. Our recommendation is to turn off the “Send” event unless you really need it because in the case of big volume sending, this could easily overload your system.

If you already have some webhooks set up, you will see the following pop-up when you try to enable the tracking with Segment.


You will have to choose the best option for you, but if you are reading this article, it probably means that you will want to use Segment since it is an awesome tool.

You can see below how each event supported by Mailjet will appear at Segment:

  • Open events – sent as “Email Opened” to Segment
  • Click events – sent as “Email Link Clicked” to Segment
  • Bounce events – sent as “Email Bounced” to Segment
  • Spam events – sent as “Email Marked as Spam” to Segment
  • Blocked events – sent as “Blocked” to Segment
  • Unsubscribe events – sent as “Unsubscribed” to Segment
  • Sent events – sent as “Delivered” to Segment

If you want to keep learning about more advanced tracking you can see how you can group your emails or tagged them here. If you are still wondering why it is a good idea to connect your Mailjet account and your Segment account, keep reading to see some of the advantages we’ve highlighted for you.


The first advantage we will mention is if you are feeding your segment data to Mailjet, you can synchronize and update your contacts automatically, without the need to import everything on your own. This way you will know that you list is always up to date with the latest contacts and properties and any segmentation or personalization will work seamlessly.

But let’s focus more on one of the main superpowers of Segment – creating a personalized customer journey. If you are storing all of the information for your recipients including their behaviour like opening and clicking on emails, you can easily know which news is relevant to them. This will help you create the perfect emails for them using advanced personalization and segmentation, or even use this data to personalize their journeys and what they see on your site.

For example, for Jane you can create the perfect email featuring shoes and bags (we all need some good accessories) and show her a landing page with the latest models in her favorite colors. At the same time, you can send Jaime emails for the newest hockey equipment you received, because they’re playing hockey almost every day and always needs new equipment.

Personalization is so easy and the opportunities are endless when you know a lot about your customers. Knowing everything you need for your customers is made possible by using Segment options.

Integrating Mailjet with other tools that you have connected with Segment is another valuable advantage. This way you can send and receive data to and from Mailjet. The best part is you can do this without the need to code everything manually.

Summing it up

The importance of a powerful CDI is undeniable and Segment is the perfect example. Creating optimized emails and journeys for every customer can boost the engagement with your brand and your profits. Everything that is custom made is drawing more attention and appears more credible, so don’t wait to take advantage of this. Integrating Mailjet with Segment will help you automate your process of uploading contacts and keeping track of the email activity of every recipient. This way you can create segments that will send the perfect content to the right people.

For more useful articles don’t forget to follow us on Twitter and Facebook.

How to Target the Right People with Segmentation via Mailjet’s API

Do you want to increase your email open rates, boost your click rates, and decrease your unsubscribe rates? Of course, you do! Well, the best way to achieve that is to stop sending the same email to all of your subscribers. We know you know that every one of your subscribers is unique, so why would you send the same email to all of them? Instead, start segmenting your email list and send the right emails to the right people. Keep reading to find out some segmentation ideas, and we’ll also cover how to use segmentation with Mailjet’s API.

What is Segmentation

To understand why you need to segment your list, we’re going to need to cover the basics first – namely what exactly segmentation is. Information such as age, gender, location, and interests can provide a lot of insight into your customers’ needs and help you with segmenting your list in the right way. Segmentation is actually the action of dividing your contact list into parts. Then, you can create personalized and relevant emails for each segment.

The most important thing to take into consideration is why this contact joined your list, so you can send them the right content. You wouldn’t send a promotional email for Star Trek items to a Star Wars fan, right? The point is to send them the content they would find interesting and relevant, and this way you can increase your open and click rates while worrying less about the unsubscribe rate. Consumers now actually expect personalized emails and segmentation is one of the easiest ways to deliver on that expectation.


Now that we know the basics of segmentation, let’s dig deeper into the advantages of using it.

Why you need Segmentation

Segmentation is a highly effective email personalization technique. By dividing your large list into different groups, you can send more targeted emails and focus on sending emails that build trust.

Segmentation is a simple but powerful mechanism that can boost your engagement and profits. To segment correctly, you need to think in groups and find something in common for each group. And if it is something beyond the obvious separation between men and women, you can show your customers that you know them. The segments can be as large or as small as you want, but in most cases, the smaller they are, the more likely it is that the information you send will be relevant for the recipient. Without email segmentation, it’s difficult to engage your subscribers and improve your conversion rate.

Some ideas for segmenting your lists

Once you have collected the necessary data, you now need to decide what the best way to group your subscribers into segments is. You can create segments based on age, similar purchase histories, interests, and different traits relevant to your brand to send targeted emails. Once you start brainstorming segmentation criteria, the possibilities are almost endless. You can use all the data you’ve collected so you can create the perfect email for each segment. Here are some ideas for segmentation:


However large or small your target market might be, you can use geography to segment your email list. You can create a special email category for people in a particular city or country if your business has a presence multiple ones.


You can get detailed information about subscribers’ personal interests by creating user profiles on your website, or using an email subscription center, or even your opt-in. You can ask them anything that can help you send them more relevant information and offer them the right products.

Browsing Behavior

If you are keeping track of website behavior, this is one of the simplest ways to create the right segments. With browsing behavior, you will know what each customer is browsing and what they are looking for.


Knowing the general age range of the people on your list can be helpful with removing those not in your target audience, or to adjust the messaging of your email communications to better suit that demographic.


This may be pretty basic, but it is still one of the best segmentations that you can use. Offering the right range of products to women and men is something that can be accomplished so easily, and still, be so efficient.

Purchase History/Purchase Behavior

Segmenting by past purchases is another simple way to optimize your email targeting. You can always offer products that are similar to the one that the customer already bought. Or, if a customer bought something that requires replacement, refilling, or renewal, you can send out targeted emails based on their needs.

You can even consider some clients as VIPs after a certain number of purchases. You can add a dedicated section in your email specifically for them and create a segment to target them.

Email behavior

Open rates and click rates are metrics that everybody should be checking and collecting information on. They are the easiest way to know which contacts are] active, and which ones are no longer engaging. You can then create a specialized campaign designed at re-engaging your inactive subscribers or offer the active ones the latest news.


If you are planning on making surveys, there’s no doubt you’re planning on using the results in the best ways, and we’re positive one of them is for sure segmentation. You can build emails for the different segments that you created depending on the feedback you received.

You can segment based on everything you can think of that’s relevant to you and your brand. There are no limitations.

Now that you have some ideas, let’s explore actually creating a segment with Mailjet’s API.

How to create a segment with Mailjet’s API

Creating your segments will be so easy and it can be done with just a few lines of code. We’re going to walk you through an example where we will create a segment for all men from London that are interested in Star Trek, so we can offer them our new Star Trek-inspired male collection.


Our /contactfilter resource allows you to create segmentation formulas like the one below:

curl -s \
        -X POST \
           -H 'Content-Type: application/json' \
           -d '{
                "Description":"Only men from London that are interested in Star Trek",
                "Expression": "((gender=\"men\") AND (city=\"London\") AND (interest=\"Star Trek\"))"
                "Name":"Star Trek new collection London"

As you can see you can add a description, expression, and name for each segment. Since the name and the description is something really obvious, we will focus a little more on the expression part. This is where you are actually saying who will receive the message. You can have simple expressions with only one condition or complex ones with more conditions connected with “AND” and “OR” operators.

You can find all the operators that are available for comparing the properties here. You will need to keep in mind that not all of them are supported by our interface. Because of this, some segments created via the API may not be recognized as valid in the app. However, you will still be able to use them in your campaigns. You can use any of these operators to create the perfect segment for your needs.

Another thing that you will need to know is that you can only apply one segment to a campaign. This is why if you need to make sure that your segment is perfect before going to the next step.

When the segment is ready, it’s time to apply into your campaign! For this, you will need the Segment ID. You can find the payload you received as a response for the segment you created, and it will look a little something like this:

     "Count": 1,
     "Data": [
               "Description": "Only men from London that are interested in Star Trek",
               "Expression": "((gender=\"men\") AND (city=\"London\") AND (interest=\"Star Trek\"))",
               "ID": "123456",
               "Name": "Star Trek new collection London",
               "Status": "unused"
    "Total": 1

Take note of this ID and keep it safe because you will need it for the next step.

Sending to segment with Mailjet’s API

The segment should be applied to a campaign draft and you will also need the list that you want to use. Two more IDs will be needed for this – the one from the campaign draft and the one from the list. Once you have those IDs, the rest is easy. You’ll simply have to execute the code below and the rest is done:

curl -s \
       -X POST \
            -H 'Content-Type: application/json' \
            -d '{
                 "Subject":"Greetings from Mailjet",
                 "Title":"Friday newsletter",

Summing up

Now you are ready to send the campaign (once you’ve made it pretty, of course). The last thing you will have to do is publish the draft and send it as campaign when you’re happy with the content. All the steps for how to do so can be found in our documentation.

If you want to find out how you can use segmentation in an advanced way with our Passport tool you can check those two articles for marketing and transactional templates.

What Is the Return-Path and Why You Need to Customize It?

Have you ever heard of a return-path? If you haven’t, maybe you are missing one thing that you can do to help your deliverability. The return-path is the one that will help you manage your bounces and clean your list. Let’s check it out in details.

What is a Return-Path?

We’ll start with the purely technical return-path explanation provided in the standard RFC documentation and then break it down and explain it in a more understandable language.

The return-path header (return-path header, in English) is an SMTP email source address (SMTP MAIL FROM, in English) used to process the bounces that occur in your emails.

It can also be called reverse path, sender, sender, MAIL DE, 5321-DE, sender, De_ and Errors a. This address receives information on all bounces. As much as we hate them, rebounds still happen and we must be aware of that. This can be tons of help for your your deliverability.

So this means that once the email is sent, the return-path is added to preserve the value of the SMTP MAIL FROM command. So, it is the mailbox provider (for example Mailjet, Google, Hotmail, Yahoo) that adds the return-path header.

When you look at the full header of your message (we know that you don’t usually do that, but you can try now just to see what we are talking about), you will see the return-path header somewhere at the top. In most cases it’s just above the Received header, which shows the public IP where the mail was sent from (in our case this would some of Mailjet’s IPs).

It is important to know that there should only be one return-path header. In the case there are more, this would indicate that something is wrong with the SMTP configuration and you need to dig deeper to check it.

Up until now, everything sounds so strange, right? Maybe knowing the main purpose of the return-path will enlighten you a bit.

What is the return-path for?

Return-path is used to process bounces. As an email service provider, it is a good idea to have a generic address that is handling those bounces. This should be an email that you will have access to, and therefore an email with your domain. Do you see where we’re going now?

Return-path is added once the email is sent, to preserve the value of the SMTP command MAIL FROM. Therefore, it is the email provider (e.g. Mailjet, Google, Hotmail, Yahoo) that adds the return-path header.

The return-path header must be present in all emails to track bounces. If the return-path header is not present and a bounce occurs, the email servers will be confused and will not know where to send the bounce notification. This means that you will not know the existence of the bounce, you will not be able to remove that address from your list and you will continue to send to that address, which can negatively affect your sender score.

In Mailjet, all emails pointing to an address in Mailjet’s SMTP environment will have a return-path address with a Mailjet domain. This means that everyone who receives your emails will be able to see the return-path that you use and that you are a Mailjet customer. For some people, this is no problem. However, if you wish you can customize your return path using a CNAME record.

Why should you customize your return-path?

The reason for customizing your return-path has to do with email authentication processes, or how the recipient’s server determines which emails to let through and which ones it rejects.

DMARC is an email validation system created to detect and prevent phishing. One of the many tasks the DMARC system performs is to check the concordance between the sender’s name and your return-path name.

With the increase in phishing attacks, ISPs have been trying to protect their reputation. Even trusted email providers are subjected to exhaustive controls.

There are many factors that can cause problems with deliverability, but one of them has an easy solution: clean up your email header and customize your return path. Each server has a different way of interpreting email headers to establish authenticity, but the more systematic the signals in your messages, the better.

It makes sense that the DE address and the return-path address have the same domain, doesn’t it? Many servers will reject an email claiming to come from a certain address if the message is not sent by a server that usually manages that address.

With Mailjet you can customize the return path to ensure that no one gets your reputation compromised through a CNAME record. To understand how it works, we must first see what CNAME is.

What is CNAME?

CNAME is the abbreviation for Canonical Name. CNAME records can be used to alias for a name. Any system hosting a site must have an IP address in order to be connected to the World Wide Web. The DNS resolves the name of your site to its IP address, although sometimes several names resolve it in the same IP address , and this is where the CNAME is useful.

For example, if you own and that points to the same site or application and are hosted on the same server, it would be very useful to create the following to avoid keeping two different records:

  • An A record for pointing to the server IP address;
  • A CNAME record for pointing to;


Then you will have, which points to the IP address of the server, and points to the same IP address of the server ( If it is necessary to modify the IP address, you only need to update it in one place since it will be replicated in the other.

However, the CNAME has some restrictions.

  • You should always point to another domain name and never directly to an IP address.
  • It cannot coexist with another record for the same name. You cannot have a CNAME and TXT record for
  • You can point to another CNAME record, although generally this setting is not recommended for performance reasons. If applicable, the CNAME record should aim as much as possible at the target name to avoid unnecessary performance demands.
  • You cannot put a CNAME record at the root domain level because the root domain is the Start Of Authority (SOA) of the DNS that must point to an IP address.
  • MX and NS records should never point to a CNAME alias.

A surprising novelty is that with the latest generation of DNS technology, the same CNAME record will be able to redirect to one of several names based on dynamic parameters. This will make it even easier to manage CNAME records.

A and CNAME records are sometimes confused, but they are two different and common ways of assigning a hostname to one or more IP addresses. There are important differences between these two records that need to be taken into account. Record A points to a specific IP (you want to point to server and the CNAME record to point to another name instead of an IP ( points to

Think of the CNAME record as an alias for the destination name that inherits its entire resolution string.

Some common uses of CNAME records are:

  • Provide a separate hostname for specific network services. Common examples are email or FTP that points that hostname to the root domain.
  • Many people use subdomains to manage their different services or clients linked to the primary domain (for example,, and CNAME record to point to the client’s domain (
  • Register the same domain in several countries and have the country versions point to the main domain “.com”.
  • Point from several websites owned by the same organization to the main website.

How you can customize your return-path

Now that we know more about the CNAME record, let’s see how you need to configure it to be able to customize your return-path with Mailjet. We’ll use the first of the common examples: you use a CNAME record to have your own domain point to our domain in the return-path address.

The default return-path Mailjet uses is “”. Since we must receive the bounce events, you cannot change it completely, because if you do we will not be able to receive the events.

Setting up the CNAME

To customize your return-path, you’ll need to do three simple steps: create a subdomain, create the CNAME record in your DNS zone, and contact us to activate the redirection.

Step 1

Create a subdomain in your main domain using the prefix “bnc3”. For example, with a main domain, you will have to create a subdomain

Step 2

You must access your DNS zone and create a CNAME record that looks like this: IN CNAME

This will mean that your domain will now point to Therefore, everyone will see in the email header, but it will actually point to our and we will continue to receive bounce events and update your statistics.

Step 3

The final step would be to get in touch with us. To do this, you can open a ticket with our support team and provide us with the following information so that we can activate your personalized return route:

  1. The API key you want to activate the return-path.
  2. The CNAME record you configured: the screenshot or text version of the record will be perfect.

Please note that you can only have one active return-path per API key.

Once we have this information, we will do the necessary and our agents will get back to you with the good news that everything is ready. And there you go – you have your customized return-path.


Deliverability is very important to every sender and in this article, we have learned one more thing that can help you make it easier. The return-path is important for email providers to know where to send the bounces and where to deal with them. We’ve also learned why it’s best to customize it, what the CNAME record is, and how it works.

For more useful articles, don’t forget to follow us on Twitter and Facebook.

Use Mailjet’s API with Postman

Developers are always searching for new and better applications, libraries, integrations, and ways to work. This is why each developer has a wide range of tools at their disposal. It’s the same for you, isn’t it?

Now you can send your emails better and easier with Mailjet and Postman – which we know will be your new favorite application (if this isn’t the case already). Let’s dive in.

What is Postman

When you are setting up your transactional emails flow, a lot of checks and test API calls are needed to see if everything is working. Having an intuitive tool with easy to use libraries of API calls can be your salvation in a situation like this. This tool will be your best friend. Why? Because it’s going to make your life a whole lot easier. So, drumroll, please… 🥁 Say ‘hello’ to Postman.

Postman is a widely used API tool that helps 7 million developers and more than 300,000 companies access millions of APIs every month. It provides features for designing, testing, mocking, and debugging API requests to make API development easier for everyone.

Postman offers a development environment that you can use to build, publish, document, design, monitor, test, and debug APIs. It allows users to set up all the API expects and checks the response of your request. It’s really easy to use it, you will just need to log in to your own account to access files anytime, anywhere. But let’s have a closer look at what Postman offers and how it works.

How to use Postman

If you still haven’t downloaded Postman, you can get it here for Mac, Windows, or Linux.

Once you’ve installed Postman, you will have to create an account, select the workspace tools you need and click Save My Preferences. Now you’re ready to use Postman! The Postman application will open and this is what you’ll see:


Let’s have a look at a few of the most important buttons:

  • New – This is where you will create a new request, collection or environment.
  • Import – This is used to import a collection or environment. There are options such as import from file, folder, link or paste the raw text.
  • My Workspace – You can create a new workspace individually or as a team.
  • Invite – Collaborate on a workspace by inviting team members.
  • History – Past requests that you have sent will be displayed in History. This makes it easy to track the actions that you have done.
  • Request tab – This displays the title of the request you are working on. By default, “Untitled Request” will be displayed for requests without titles.
  • HTTP Request – Clicking this will display a dropdown list of different requests such as GET, POST, COPY, DELETE, etc.
  • Request URL – Also known as an endpoint, here you’ll identify the link with which they API will communicate.
  • Params – This is where you will write parameters needed for a request such as key values.
  • Authorization – In order to access APIs, proper authorization is needed. It may be in the form of a username and password, bearer token, etc.
  • Headers – You can set headers, such as content type JSON, depending on the needs of the organization.
  • Body – This is where one can customize details in a request commonly used in POST request.

Using Postman with Mailjet’s API

Let’s try an easy request with Mailjet’s API and see how it works. We will take a simple API call for sending an email with API 3.1:

# This call sends a message to one recipient.
curl -s \
    -X POST \
    -H 'Content-Type: application/json' \
    -d '{
                  "From": {
                           "Email": "",
                           "Name": "Mailjet Pilot"
                  "To": [
                         "Email": "",
                         "Name": "passenger 1"
                  "Subject": "Your email flight plan!",
                  "TextPart": "Dear passenger 1, welcome to Mailjet! May the delivery force be with you!",
                   "HTMLPart": ">Dear passenger 1, welcome to Mailjet! May the delivery force be with you!" 

We will start with the authentication part. You’ll have to select Basic Authentication and enter your API key and secret key that you can find here.


Now we will copy the endpoint to the Enter request URL and choose the method we need. In our case, the method is POST and the endpoint is We will go to the Body and select the “raw” view and JSON(application/JSON) as a framework.


Now we will copy the body of the API call we have as an example above and replace part of the information. I mean, we do need a real email address for the sending, right? 😉 But here’s how it will look like before replacing the data:


Once you have replaced the information with your own data, you will have to click on the Send button that is to the right of the field where we put the endpoint. If everything was correctly set up, you will see the response in the payload, in the field below the one with API call.


We can see that the status is 200 OK (so, everything is fine with our API call) and the time that it took to execute the call and the size of the call. The payload contains all the information from Mailjet to check what happened to your message. And that’s it! Now you know how Postman works.

Something that is worth mentioning too is that Postman stores all of the calls that you’ve ever made in their History tab. This way, you can go back to a previous configuration and reuse it, without the need to code everything again. This is useful if you want to compare two API calls or their response, or if there is a configuration that you need to call often to check its response.

Postman also offers a useful feature called “Collections” that allows you to organize and group the API calls, or import already existing ones. Each collection is actually like a folder that contains multiple API calls, and allows you to add sub-collections (or additional folders) as well. Collections are as useful as the History tab when you have to test the same endpoints multiple times. You can group your API calls in different folders so you can easily find them.

Personally, we love Postman because it is easy to use and it offers a lot of collaboration features that let us work together a lot more efficiently. Want to know more about that? Stay tuned and we’ll be publishing a post about it soon.

But, as we mentioned, the collections in Postman make your work easier, do you think that we’re going to make you copy all of your API calls by hand? Of course not.

How to add Mailjet’s API collection on Postman

If you already love Postman, you can download Mailjet’s API Postman Collection using the button below.

This button is also available in our API documentation if you want to check it first.

Once you have imported the collection in your Postman application, you can easily access all of our endpoints and do your tests. This will save you a lot of time. Postman will provide you with the detailed payloads for each API call and do the troubleshooting (if needed, because we know you are gods of coding) easier.

How Mailjet’s API collection will look like in Postman

Don’t forget to follow us on Twitter and Facebook for more helpful articles and tips.

3 Ways to Make Email Easier for WordPress Users

WordPress is an online, open source tool written in PHP, designed for the creation of websites. It’s probably the easiest and most powerful blogging and website content management system (or CMS) in existence today.

Combining the power of Mailjet with WordPress will make your life easier and your emails better. Once you have Mailjet’s plugin installed on your WordPress, you can manage your subscribers, send beautiful emails, and even track your statistics.

You want to know more? Keep reading. 😉

Why we love WordPress

WordPress is a software you can use to create your own website, blog, or even an application. It was released in 2003 and quickly became one of the best CMS (content management system) on the web. Currently, WordPress is used for more than 33.6% of all websites on the Internet. In fact, some of the most famous sites are created on WordPress – blogs like Mashable and TechCrunch. News outlets like The New York Times’ blogs and CNN’s on-air personality blogs all use WordPress, too.

WordPress can be downloaded for self-hosted installations from or it can also be used as a hosted service via There are some slight differences between both options., often called self-hosted WordPress, is the free, open-source WordPress software that you can install on your own web host to create a website that’s 100% your own.

  • Self-hosted WordPress is available at If you want to truly own your website, self-hosted is almost always the best option. is the free tool that you can use for no cost if you don’t need any paid themes or plugins.
  • is a for-profit, paid service that is powered by software. It’s simple to use, but you lose a lot of the flexibility of the self-hosted WordPress.

In the infographics below you can see the main differences and decide what option is the best for you:

Why choose

At Mailjet, we think is the best option. If you’re not sure yet, let us tell you why we think it’s best to choose to create your site:

  • WordPress is free: You are free to download, install, use and modify however you want to match your needs.
  • WordPress is open source: This means that you can also modify it according to your needs. Another amazing thing is that hundreds of users all around the world are constantly creating and improving the WordPress software.
  • WordPress is easy to use and flexible: WordPress enables you to build and manage your own full-featured website using just your web browser – without having to learn how to code.
  • WordPress offers a lot of themes: There are customizable WordPress themes for just about every kind of website (whether it’s a blog, business site, or an online store).
  • WordPress offers a lot of additional plugins: You can use them to add advanced features like sending emails (go Mailjet!), analytics, contact forms, managing online shop, and much, much more.
  • WordPress is secured: WordPress has safety measures to protect your data from any accident or hacking.
  • WordPress has a great community: WordPress has an official forum that is a great place to get answers to your questions, and organizes events around the world throughout the year.
  • WordPress makes it easy to import and export data: You can import your data from other platforms like Blogger or Tumblr to WordPress, and you can easily export it to move away from WordPress, whenever you want.

So, what are you waiting for? Go get WordPress today to start creating your awesome website.

Mailjet’s email plugin for WordPress

If you’re looking to make your life easier when it comes to WordPress and email, Mailjet is the answer for you. Mailjet is an email solution that easily integrates with WordPress, allowing you to create and send both marketing and transactional emails. Mailjet also enables WordPress users to access very detailed stats.

What’s best, you won’t need to leave your WordPress site to create, send and track you emails. The only thing you’ll need to do is to install Mailjet’s free email plugin for WordPress.

The free Mailjet for WordPress plugin will help you create, send and track beautiful newsletters in minutes. Here are a few of the things you can do with the Mailjet x WordPress plugin:

  • Create amazing emails using our drag & drop email editor, Passport, directly from WordPress.
  • Send your emails to your contact list without leaving WordPress.
  • Sync your contacts and contact properties with your Mailjet account, so you can personalize the content of your emails.
  • Check your statistics from your WordPress.

Let’s dig deeper into three of the most useful things you can do with Mailjet and WordPress.

3 Ways Mailjet x WordPress make email easier

There are so many things you can do with Mailjet and WordPress once you have the plugin. But, right now we are going to talk to you about three in particular. Let’s start with one which is Mailjet’s superpower – sending beautiful emails.

Send beautiful emails

Mailjet is the best solution to send beautiful marketing and transactional emails. Our amazing online editor Passport will help you create your emails and send them to your customers. Let’s start with the marketing emails.

Marketing emails

As we mentioned, our Passport editor is available for all WordPress users that installed our plugin. We have a large template gallery with loads of options for you to choose from and customize, or you can create your own template from scratch. It will take you only a few minutes to create your newsletter and then the only thing left to do is send it to your list of customers.


Designing your template with our email editor is also really simple, as our drag & drop builder is both easy to use and really flexible, and our detailed documentation goes over everything you need to build your email. For those that prefer coding their emails, this can be done by using HTML or our open-source markup language, MJML.

It will take you only a few minutes to create your newsletter and then the only thing left to do is send it to your list of customers.

The best thing about it is that once you have the plugin installed, WordPress syncs your contacts automatically with Mailjet. The only thing you should have in advance is the contact properties you need already in your Mailjet account, which you’ll need to then be able to personalize your emails.


We’ve covered the marketing emails, but they’re not the only type of emails your brand sends. Your transactional emails shouldn’t be neglected. The times when a plain text email was enough are long gone. Let’s see how you can send beautiful transactional emails, too.

Transactional emails

Transactional emails are something that your customer is always impatiently waiting for, no matter if it is account confirmation email or tracking information. Mailjet gives you the possibility to create beautiful and personalized transactional emails. You can propose similar products or ones that are on sale in a purchase confirmation based on the interest and the behaviour of each recipient.

You can see how to create this type of email on our blog post ‘How to Use Templating Language to Send Truly Personalized Emails’.

You can now send these beautiful emails from your online store on WordPress using Mailjet’s SMTP relay. You should only add a bit of code to your template functions.php file. You can see the code and all the details of how to do the configuration, you can see here.

Now you know how to create amazing and responsive emails, but even better would be to automate them with few clicks, right? Now you can connect two of the most used plugins in WordPress with Mailjet in minutes.

Contact Form 7 and WooCommerce integrations

Our integration with Mailjet includes a direct connection with Contact Form 7 and you can also easily connect WooCommerce with Mailjet via Zapier, so you can route your emails sent from these two plugins to go through Mailjet. We are going to check the details of each now.

Contact Form 7

Contact Form 7 is a plugin that allows you to create, customize and integrate any kind of contact form on your WordPress site. Almost any business needs a contact form, whether it’s for asking questions, contacting support or requesting quotes.

Contact Form 7 is the most used plugin of WordPress with over 5 million downloads. Can you imagine how many contact forms are created with it? This is why we decided that we want to make your life easier and automate the emails you are sending through these forms. That’s why we included a connection with Contact Form 7 in our native integration with WordPress.

Activating the Contact Form 7 feature on the Mailjet’s WordPress plugin is pretty easy. Check out how to do it on our recent post about Contact Form 7.


WooCommerce is perfect for you if you have an online store. You can sell digital and physical products, manage inventory and shipping, take secure payments, and sort taxes effortlessly. You keep 100% control over all your data, there’s support for mobile devices, and the potential to scale your sites is limitless. Isn’t it great just imagining it?

WooCommerce is by far the best designed and most popular eCommerce plugin for WordPress. Routing your marketing and transactional emails from Woocommerce through Mailjet is really easy to do via our integration with Zapier.

And once your emails are sent, how are you going to be able to see what is happening with them? Mailjet offers detailed statistics available directly in your WordPress. Let’s take a closer look at that.

Track statistics

There is more to emailing than just sending campaigns or setting up transactional emails. It’s also about tracking your emails’ performance, analyzing the results, and drawing conclusions to improve your future sending. With Mailjet’s integration with WordPress you have access to detailed statistics directly in your WordPress.


You can filter for a specific date or email status of your choosing, update your list directly, remove blocks or spams from this page, or even create a new one with only click and open rates. You can always download these statistics as a CSV file and use them in another application if you need to, or just store them somewhere safe. Mailjet gives you all the tools that you need to maintain your lists and adapt your sending.

Installing the Mailjet email plugin for WordPress

So now you know what cool things you can do with Mailjet and WordPress. Can’t wait to try it? The latest Mailjet for WordPress v5.1 can be downloaded from the WordPress plugins directory.


Setting it up is also really easy.

To configure the Mailjet plugin, first click on ‘Setup account’ from the Installed Plugins page.


You will then be asked to enter your Mailjet API and Secret key here.


Once that’s done, your Mailjet account will be connected to your WordPress and ready to use. See? We told you it was easy!

Let’s wrap it up

We saw that you can connect Mailjet with WordPress and other WordPress plugins with ease. WordPress gives you the power to create and maintain your site, and you can combine it with the amazing possibilities of Mailjet without the need to even leave WordPress – from creating and setting up your emails, to checking your statistics after sending them. What else could you need?


For more useful tips and articles follow us on Twitter and Facebook.

What Is DMARC and How Does It Work

You are the owner of your own domain. It represents your brand in the best way possible: it is already known by your customers and they are expecting your emails.

But what if one day someone sends an email from your domain offering the same content that you offer to your customers and just pocket the money? Doesn’t sound good. To top it all off, it’s hard to convince people that it wasn’t you…

So keep reading about the amazing powers of DMARC and find out how to avoid such uncomfortable situations.

What is DMARC?

Domain-based Message Authentication Reporting and Conformance (DMARC) is an email validation system created to protect your domain from being used for email spoofing, phishing scams and other cybercrimes.

Think of it like your own personal security guard for your domain. DMARC was created by PayPal with help from Google, Microsoft and Yahoo! as an email security protocol. These industry leaders came together to develop an operational specification, with the desire that it would be able to achieve formal standards status. At this point DMARC is a necessity for the online security of one domain.


When you as a domain owner set up a DMARC record into your DNS record, you will gain insight into who is sending emails on behalf of your domain. DMARC uses the email authentication techniques SPF (Sender Policy Framework) and DKIM (Domain Keys Identified Mail) and adds an important function – reporting.

This means no one will be able to borrow your domain to send an email asking for a $100 donation for the Amazon rainforest and then use the money to buy a new yacht… to go see the Amazon rainforest.

How does DMARC work?

As we mentioned, DMARC relies on the established SPF and DKIM records for email authentication. But unlike SPF and DKIM, a DMARC record could tell the server if he should or shouldn’t accept a message. With DMARC, it becomes possible to gain insight into phishing attacks. This way, customers can be informed in advance and will be aware of attacks.

Every major ISP server performs a DMARC check nowadays and the implementation of DMARC happens more and more frequently. Now let’s take a look at how the record works and understand why we need it.

The process of DMARC validation works as follows:

  1. The domain owner sets the policy, choosing its email authentication practices and how the recipient servers should handle mail that violates this policy. This DMARC policy become part of the DNS records of this domain.
  2. In case that the inbound mail server receives an incoming email, it uses DNS to check the DMARC policy for the sender domain in the “From” (RFC 5322) header. The inbound server then evaluates the message based on three key factors:
    • Is the DKIM signature correct?
    • Is the sender IP included in the SPF record?
    • Do the headers in the message show proper “domain alignment”?
  3. When the information is collected, the server can decide what to do with the message according to the DMARC policy.
  4. The server will inform the domain owner for the outcome and what has happened with the message.

To put it another way, DMARC allows you to secure your domains and decide what should happen when recipient servers receive unauthenticated mail coming from your domain. DMARC is a very powerful solution to fully secure your email domain when configured correctly.

DMARC explained

To understand DMARC even better, we will explain what each part of it means. It might look like strange symbols that don’t have any meaning and the only thing you will understand is your domain, but that’s why we are here to help you.

Once you are done reading this article you will “speak” fluent DMARC language. Let’s start with how a DMARC looks, and then go through it piece by piece:



v=DMARC1 is the identifier that the receiving server looks for when it is scanning the DNS record for the domain it received the message from. If the domain does not have a txt record that begins with v=DMARC1, the receiving server will not run a DMARC check.


“p=none” tells the receiving server what to do with messages that fail DMARC. There are three policy options – none, quarantine and reject. What policy is best for you depends on your needs.

Let’s dig a bit deeper into them, because we dare to say that this is the most important part of the record.

Monitor policy: p=none

The DMARC policy “none” tells the email receivers to send DMARC reports to the address published in the “rua” or “ruf” tags of the record. It is known only as a monitoring policy because with it you gain insight in your email channel. But, it does not instruct email receivers how to handle emails that fail the DMARC checks. You can use the “none” policy to start with DMARC and gather all DMARC reports and start analyzing this data.

Quarantine policy: p=quarantine

Another type of policy is the “quarantine” one. This DMARC policy instructs email receivers to put emails that fail the DMARC checks in the spam folder and also sends the DMARC report. The quarantine policy already controls the impact of spoofing, but spoof emails will still be delivered to the receiver (but in the spam folder… and who is checking that, right?).

Reject policy: p=reject

The third policy is the “reject” one. Besides sending DMARC reports, the DMARC policy completely rejects the emails that fail the DMARC checks. All other emails that pass the DMARC checks will be delivered in the primary inbox of the receiver. This policy best mitigates the impact of spoofing.



This tells the server where to send aggregate reports of DMARC failures. We’ll see more about the reports in the next section of the article. You can add any email address you choose or even add multiple ones.


This is for the forensic reports of DMARC failures. With this, there is one requirement for the email address – it must be from the domain that the DMARC record is published for.


Once we chose the email address where we want the reports sent, we should choose what kind of reporting we want. In this case rf=afrf means aggregate failure reporting format. This would be perfect for you, if you have a system already set in place that monitors those reports.


This part of the record tells the server how much of their mail should be subjected to the DMARC policy’s specifications. In this case, if the p= (remember the three policies up above?) was set to reject, 100% of the mail that fails DMARC would be rejected.

Other key mechanisms:

There are a number of other mechanisms that can be included in a DMARC record. A few important ones are:


This part would tell the receiving server whether or not to apply the DMARC policy to sub domains. The values are the same as “p=”.


This sets the DKIM alignment. It can either be set to “s” for strict or “r” for relaxed. Strict means the DKIM portion of DMARC authentication will only pass if the d= field in the DKIM signature exactly matches the from domain. If it is set to relaxed, messages will pass the DKIM portion of the DMARC authentication if the DKIM d= field matches the root domain of the from address.


Indicates strict or relaxed SPF identifier alignment. The default is relaxed.


This sets the interval for how often you want to receive aggregate reports about DMARC failures. The default value is 86400 seconds which is equivalent to one day.

Let’s stop here before it gets too overwhelming and see know what a DMARC report shows and how it helps your brand to avoid any spoofing.

DMARC reports

As we saw in the previous section, the reports can be two different types: aggregated and forensics. Those reports help you ensure you that you are properly authenticating your outbound emails. You can check out the difference between both of them below.

Aggregate reports

They are XML documents showing data about the messages received that claimed to be from a particular domain. Those reports are meant to be machine-readable. Here’s one example:

Forensic reports

These are individual copies of messages which failed authentication, each enclosed in a full email message using a special format called AFRF. Those reports are easily read by a person, too. The information that those reports could contain is:

  • Subject line
  • Time when the message was received
  • IP information
  • Authentication results
    • SPF result
    • DKIM result
    • DMARC result
  • From domain information
    • From address
    • Mail from address
    • DKIM from address
  • Message ID
  • URLs
  • Delivery result
  • What was the applied policy, the message could be rejected if there’s a reject policy in place, or quarantined, or delivered because of a none policy
  • ISP information

Now we know how a DMARC works, how it looks, and what information it provides. We’re pretty certain you already know how useful this could be for you. But let’s see all advantages in the next section.

Do I need DMARC?

If you are a business sending any emails that include personal information (invoices, order confirmations, even account activation ones), or any emails with marketing purposes (commercial), you definitely need to implement one or more forms of email authentication to verify that an email is actually from you and your domain.
DMARC helps receiving servers determine how to evaluate messages that claim to be from your domain, and it is one of the most important steps you can take to improve your deliverability. Even if DMARC is not obligatory for sending with Mailjet, we recommend you set it up so you can avoid any spoofing alongside with the SPF and DKIM. Check the links to learn how to set up SPF and DKIM.

We know that this article is enough to understand how to set up DKIM, but you can always check the guide of our colleagues/partners from Google by clicking here. For any general questions about DMARC you can always contact our support.


Let’s wrap it up

With DMARC, an organization can block malware, phishing attacks, and improve its deliverability all at the same time. Once enabled, a DMARC record ensures that only authorized senders are able to use your domain to send messages. That means recipients can tell at a glance who the email really comes from, and they can be certain that it’s not coming from a spoofed domain.

DMARC will make sure that emails that use your domain but fail authentication won’t even appear in recipients’ inboxes. So no one will be able to collect money to go to the Amazon rainforest by using you brand.

Don’t wait! Set up your DMARC and be sure that no one is using your domain without you knowing.

For more useful tips don’t forget to follow us on Twitter and Facebook.

This is an updated version of the blog post “Some words about DMARC” published on the Mailjet blog on April 25, 2014.

Mailjet SMS is Now on Zapier

Yes, you heard us right. With Zapier’s help, you can now easily integrate Mailjet’s SMS.

If you already tried the transactional SMS option of Mailjet, you know how easy it is to use. Now, it’s a piece of cake to send SMS to your customers for two factor authentication, order confirmations, booking numbers and any other transactional purpose you can think of.

What is Zapier?

Let me throw a scenario at you. Say you wanted to create a new line in a spreadsheet every time someone contacts you through your website with the information of their request. You’re thinking you’ll have to download the information manually, copy it and then paste it… Every. Single. Time.

We feel your pain, but worry not, Zapier will make this a whole lot easier for you.


Simply put, Zapier is a tool that connects and automates most of the apps you use, like Mailjet, WordPress, Gmail, Zoho, Trello, and hundreds more. And the best thing? You don’t need any coding to do this! If you’ve ever used IFTTT (If This Then That), it’s very similar, but Zapier lets you string multiple actions together to build multi-step zap workflows. Think of it like, “if this, then that and that and that and that.”

You can have Zapier automatically repeat tasks you would normally do yourself in your different apps. You can create a “Zap” that connects two or more apps so they can talk to each other without you even entering the conversation. It allows you to connect apps that don’t normally communicate AND automate tasks between them.

Let’s say that you have one employee who only speaks English (let’s call him Mailjet) and another who only speaks French (we’ll call him BigCommerce). Normally, Mailjet and BigCommerce wouldn’t be able to speak to each other because those two languages are so different. But because Zapier speaks API, it will act as the translator between them and make the communication possible.

And what is API you might ask? API is the universal language of all programs, and with its help, Mailjet and BigCommerce can talk to each other.

Within a Zap, there are Triggers and Actions. If a Zap functions on a cause and effect model, the cause would be your trigger, and the effect is the action. Here’s an example: imagine you have a new order in Shopify. This would be the cause (trigger) for the effect (action) of sending an email with the tracking details using Mailjet. Automated data flow –it’s a beautiful thing, right? 🙌

Mailjet’s transactional SMS

The average open rate for transactional SMS is 98%, making it one of the more powerful ways to reach your contacts. With Mailjet, you can now easily create and send personalized transactional SMS messages to your customers in more than 60 countries. I’m sure you can see why we introduced our SMS solution 😎.

Everytime we are creating an API feature, we are sure to take two things into consideration for our users: how useful is it, and how easy is it to implement.

We already said why this is useful, and exactly how useful it is (98% open rate!). We are also happy to tell you that it is pretty easy to use our SMS API, allowing you to send SMS messages all around the world with only a few lines of code!

Right now, we only support transactional SMS, such as booking confirmation, subscribing or making a purchase. Just like transactional emails, transactional SMS messages are triggered by an action on behalf of the customer. For example, if you are running a travel agency, you can easily send booking confirmations per SMS too.


To send SMS messages with Mailjet, you need two things – funds in your SMS wallet and a Bearer token to authenticate your requests.


To find out how to do this, check out our guide for SMS.

Mailjet & Zapier

At this point, you may be wondering how Mailjet and Zapier fit together. We’ve got that question covered.

The Mailjet x Zapier integration allows Mailjet clients to extend the reach of their Mailjet account to their favorite apps. You can start transferring data back and forth between your Mailjet account to various third party SaaS applications. With our integration, you can easily send emails and SMS through Zapier. Let’s start with the SMS option.

Sending SMS

With the new “Send SMS” Action in Zapier you can easily integrate Mailjet’s SMS API. Connect your platform (e-commerce, CRM, or other) to Mailjet and automatically send transactional SMS messages when an event occurs.

When someone buys something from your online store, you can send them the order confirmation and the tracking number via SMS, so they can easily check it on their phones any time they need. Ingenious, right?

And the cherry on top: the set up is really easy! You can see how to create and manage your SMS Zaps in our detailed guide.


Sending email

But what about when it comes to sending for marketing purposes? Well, then you will still have to send an email. With our amazing responsive email builder Passport, you can create beautiful emails with very little hassle on your part.

You can take advantage of the services that Mailjet offers, such as Real-Time Monitoring, Template Language, Dedicated IPs and others. Then, you can automate your tasks using our Zaper integration. Send them a welcome email, or maybe shoot off some emails for new offers that could interest your clients, then track open and click data. You can analyze the data with more than 1,500 tools that will make your work so much easier for you.

Summing up

SMS is the perfect option to address your customers with information about their orders, and it can even be combined perfectly with your marketing emails. Mailjet gives you access to features that can help you improve your deliverability, boosting your customer engagement. Your customers will love to have their order information in front of their eyes as soon as they click purchase

Zapier can also help you easily integrate with your own tools and applications. Check out the Mailjet integrations you can use through Zapier here.

So what are you waiting for? Start exploring and share your thoughts with us on Twitter!

Contact Form 7 Is Now Available on Mailjet’s WordPress Plugin

Do you use WordPress? If so, we’ve got news. Big news. The best news.

Mailjet’s integration with WordPress is now even better. “How’s that possible?” you ask… Well, we’ve just added WordPress’ most popular plugin, Contact Form 7, to our own integration with WordPress! Want to know how you can use it and how to make contact list growing and email sending easier? Read on!

Why you should use WordPress

If you’re not using WordPress yet, but are curious as to why so many others do, here’s a small introduction.

WordPress is an online, open source website creation tool. Many famous blogs, news outlets, music sites and celebrities use WordPress to create and manage their own sites. If you’re wondering what makes WordPress special, here are the four most important reasons for us.

WordPress is free

Yes, that’s right! WordPress is a free software. This means you are free to download, install, use, and modify it to match your needs.

However, while the WordPress software itself is free, you need a domain name and web hosting to install it… and unfortunately those aren’t free.

WordPress is easy to use

WordPress is not only for web designers or programmers. As a matter of fact, most people using WordPress don’t have any prior experience in creating websites.

For non-tech savvy folks, WordPress is the perfect solution because there are thousands of free website templates (themes) that you can choose from that will make designing your e-commerce page, news site or photography portfolio much easier.

WordPress is SEO friendly

Have you noticed that WordPress sites tend to rank higher than others in search engines?

This is because WordPress is written using standard compliance high-quality code and produces semantic markup. Translated into human language, this means that Google and other search engines love WordPress. To make it even better, you can use a number of SEO plugins for WordPress like Yoast, SEMrush, SeoQuake and others.

WordPress offers many plugins

Speaking of plugins, WordPress offers a lot! Just like themes, there are thousands of free and paid plugins available for you to use. For example, there are plugins that will allow you to create contact forms, increase your site’s security, manage users, improve the performance of your page and loads more.

And because plugins are what this article is all about, let’s dive deeper into two of them: the Mailjet and the Contact Form 7 plugin.

Integrating Mailjet with WordPress

Simple to install and set up, the free Mailjet for WordPress plugin will help you create, send and track beautiful newsletters in minutes. Mailjet is an all-in-one solution to send, track and deliver both marketing and transactional emails, which means can leverage all of Mailjet’s options through WordPress once you have installed our plugin.

Here are a few of the things you can do with the Mailjet x WordPress plugin:

  • Create amazing emails using our drag & drop email editor, Passport, directly from WordPress.
  • Send your emails to your contact list without leaving WordPress.
  • Sync your contacts and contact properties with your Mailjet account, so you can personalize the content of your emails.
  • Check your statistics from your WordPress.


Setting up the Mailjet x WordPress plugin

Can’t wait to try it? The latest Mailjet for WordPress v5.1 can be downloaded from the WordPress plugins directory.


Setting it up is also really easy.

To configure the Mailjet plugin, first click on ‘Setup account’ from the Installed Plugins page.


You will then be asked to enter your Mailjet API and Secret key here.


Once that’s done, your Mailjet account will be connected to your WordPress and ready to use. See? We told you it was easy!

What is Contact Form 7

Contact Form 7 is a plugin that allows you to create, customize and integrate any kind of contact forms on your WordPress site. If you have a WordPress website, a contact form is a valuable addition to it. Instead of asking your readers to contact you via mail, you can provide a contact form page and ask your users to give feedback or send queries via the form.

Contact Form 7 is the most popular free WordPress plugin. It’s easy to use and supports multiple contact forms, AJAX submitting, file uploading, and CAPTCHA. Contact Form 7 has more than 5 million users – impressive, right?

The Contact Form 7 plugin’s most significant feature is that it is really simple and easy to use. Some other features that make it a winner are:

  • Complete customizability using simple mark-up
  • Simple interface and several options
  • Useful and detailed documentation
  • Submissions in the Contact Form 7 come directly to your mailbox


The Contact Form 7 plugin can be found in the same plugin directory in which we found the Mailjet one. Just search for it, install it, and activate it.


To create a Contact Form, click on Contact > Contact Forms from the admin dashboard. There is a listing of the forms available which will be blank right now before you add one. Click on Add New and choose the language you need.

Then you will see the new contact form editor. The fields required for any contact form are already present in the form – Name, Email, Subject, Message and Submit button. There is a simple mark-up format to be followed, so you won’t miss any of those fields.

You can add more fields if needed, make them obligatory, or add reCAPTCHA. When you are done with your form click on the save button.

Adding Contact Form 7 to the Mailjet plugin

Great news! Because we know how useful Contact Form 7 is, we’ve now added a new integration with Contact Form 7 as part of the Mailjet plugin for WordPress. Now you can easily add a “Subscribe to our newsletter” checkbox to your Contact Form 7 forms. It will let you automatically add form submitters to a contact list in your Mailjet account.

As Mailjet is the first ESP to get GDPR certified, it is really important to us that all subscriptions be confirmed using double opt-in. So each visitor that checked the subscription box will receive a confirmation email.

To use the integration, simply enable it in the Mailjet plugin Settings → Integrations tab. Configuring the integration is as easy as 1-2-3.

  • Choose the list where form submitters will be added.
  • Make sure the email field tag and the name field tag (optional) match the tags in your Contact Form 7 form
  • Copy the Mailjet checkbox code and paste it in your Contact Form 7 form. Once you have this code, you should go back to your contact form that you already created. Paste it inside the form and the integration is complete!

Now it is easy to win subscribers when someone goes to your contact form to send you a message or request a quote. What could be better? That’s right – nothing. So, don’t wait – integrate Mailjet and Contact Form 7 with your WordPress page and make your site event better and your sending easier.

You can refer to our step by step guide for further instructions.

Summing Up

We saw how cool WordPress is and how the integration with Mailjet can make your sending easier. Create your site with WordPress and manage your contacts and sending with Mailjet. Now there is no need to leave your WordPress to send, track and manage emails and you can automate the synchronization of contacts with only a few clicks.

And what could be better than to be able to win customers when they are trying to contact you? This is why we introduced Contact Form 7 in our WordPress plugin, so you can add “Subscribe to our newsletter” at the bottom of any of your contact forms.

Grow your business faster than ever. Hurry up and download the plugin that can make your life easier. Discover all the amazing Mailjet features you can use directly through WordPress or our site.

You can find all of Mailjet’s integrations here and we promise there is a lot to discover. 😉

For more tips and new information, don’t forget to follow us on Twitter and Facebook.

What Is a Webhook and Why Do You Need It

Wondering what is a webhook and how it works?

Well, just think about the amount of information you get about the emails you send. We’re sure you love all the detailed stats Mailjet offers, but you wish there was just a way the right ones would come to you, so you wouldn’t need to you looking out for them. Well, luckily, there actually is. Today, we’ll tell you all about webhooks, how to set them up and how to use them to drive your email program.

What is a webhook?

Imagine that you have an online store and you want to offer a special discount for anyone opening your email in the first 24 hours. You can do it manually, by checking your email stats regularly and manually sending those who opened the discount code. But that would take you a lot of time, right?

Or you can do it automatically with webhooks, which will trigger a message with the additional discount to anyone that opens your email. Sounds more efficient, right?

Simply said, webhooks are events that trigger an action. In most cases, they are used for communication between systems. This is the simplest way of getting an alert when something happens in another system. They are called webhooks because they work as software hooks over the web.

How do webhooks work?

Let’s take your bank as an example. When you make a withdrawal using an ATM, the machine checks your balance and gives you the amount you requested. Once this operation is done, your balance is updated and this change triggers an action – an SMS is sent with the details of the withdrawal.

That’s how webhooks work. An action serves as a trigger for another action. The rest is a popular architecture used to communicate between systems.

A webhook is a HTTP callback: a HTTP POST that occurs when something happen – an event-notification via HTTP POST. Webhooks are used for real time notifications, so your system can be updated right when the event takes place.

Most commonly, webhooks are HTTP callback points that are defined by the user. They allow you to register an http:// or https:// URL where the event data can be stored in JSON or XMLformats. After that, you will be able to do what you want with the data you retrieve and store from a certain event.


The core mechanics of webhooks consist on making an HTTP request to a user’s specified URL. A webhook makes an HTTP callback to a URL that has to be configured by the system which receives the data.

That URL is called webhook endpoint. Webhook endpoints need to be public and it’s important that this URL belongs to the receiving system. The callback is triggered whenever there is an event you’d like to notify another system about.

For Mailjet, this webhook is a URL you can add in our system, so you can receive email events, such as “sent” “open, “clicked”, “bounce”, “block”, “spam” or “unsubscribe”. This way, you can either track your messages the whole path, of your message or just “listen” for the status you want.

Let’s go back to the ATM example. When you make the withdrawal, your bank is notified and updates your balance, which is the indication for the system to send you an SMS with all the details.

Webhooks work on the same concept. The ATM is a third-party app/site (webhook provider) that sends a signal when a specified event occurs. The system that sends you the SMS is what is known as the “listener”. The listener is the URL that receives the webhooks calls and performs a predefined action after that – in this case, sending the SMS. Webhooks are a programming mechanism designed to receive data that originates in some external system, in real time. In this case, that system is the bank account. Is it clearer now?

But what sort of things can you do with webhooks? Among other things, you can:

  • Synchronize systems in real time;
  • Send any kind of notification;
  • Process the data however you want;
  • Create reports;
  • And almost anything else you can think about!


Why do we need webhooks?

There are two ways your apps can communicate with each other to share information: polling and webhooks. In our example with the bank, polling would be going to your bank and asking what your balance is each time you make a withdrawal.

Nowadays, everyone needs a simpler way to get data out in real time, so they can easily do whatever they want with it. That means, no polling every minute for large exports that your system would then need to parse, risking a system overload or losing the data if there’s a bug. Using HTTP is a simpler and easier solution, as webhooks are automated messages sent from apps when something happens.

polling_vs_webhookSource: Cloud Elements – check out their post to learn more about the difference between polling and using webhooks.

There are two ways you can use webhooks:

  1. To receive the event information and store it;
  2. To receive the event information and pass it on;

Let’s look into these two scenarios closer.

To receive the event information and store it:

The so called “push” is the simplest way to use webhooks. As we already mentioned, there is no need to be polling your data every few minutes to find out if there is new information. You can just get the new information directly by using webhooks. You will be able to store it till you need it for something else. Basically, the system you configured with your webhook will PUSH the information you need when it arrives.

To receive the event information and pass it on:

The so called “pipe” happens when your webhook not only receives the information for which it listens, but goes on to do something new with it, like triggering actions. You could create a script, register its URL on your site, and send an email when a visitor creates an account. Or create a script that updates the quantity of products available every time a new purchase is made.

With webhooks, you can actually do whatever you want or need! And it is simple and efficient, because you are not wasting your time requesting for enormous amount of data – you are receiving the new data when it arrives!

How can you use webhooks with Mailjet?

With webhooks, you can easily receive each open or click event right after it happens, or track bounces and blocks as they happen. Imagine that in 15 minutes more than 60% of your emails to a destination are blocked? Thanks to the events you are receiving in real time, you’ll be able to detect this immediately and take action.

You can always use the events to create your personalized dashboard in whatever internal application you use, to process the data you want as you wish. You’ll only have the events you need and track the most relevant data. Or you can use the events received on your webhook as triggers for a new email to be send, to create a personalized automated flow for all of your users.

Mailjet event examples

Let’s dig a bit deeper into what the events you receive on those webhooks look like.This is what you’ll get when you receive an open event:

“event”: “open”,
“time”: 1433103519,
“MessageID”: 19421777396190490,
“email”: “”,
“mj_campaign_id”: 7173,
“mj_contact_id”: 320,
“customcampaign”: “”,
“CustomID”: “helloworld”,
“Payload”: “”,
“ip”: “”,
“geo”: “US”,
“agent”: “Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0”

You can see what message was opened, when exactly and other useful information that you can use however you wish.

Now, let’s check out a bounce event:

“event”: “bounce”,
“time”: 1430812195,
“MessageID”: 13792286917004336,
“email”: “”,
“mj_campaign_id”: 0,
“mj_contact_id”: 0,
“customcampaign”: “”,
“CustomID”: “helloworld”,
“Payload”: “”,
“blocked”: true,
“hard_bounce”: true,
“error_related_to”: “recipient”,
“error”: “user unknown”

Here you can also see what the error was, in the field “error”. In this case, the error indicates it’s an “unknown user”, which lets you know that it is better not to try and reach out to this user again. This could be used to synchronize two systems to clean your lists from inactives or incorrect contacts.

In shortly, you can do anything with the events you receive from Mailjet. Use them in your configuration and create what you need!
How can you configure a webhook with Mailjet?

First off, you’ll need the URL from the system from which you want to receive the events. Once you’ve got that, everything else is really simple. That URL will accept data and can activate a workflow to turn the data into something useful. There are two ways to configure your webhooks in Mailjet.

  • Using our API;
  • Using our interface;


Using our API

You will need to make one simple call to setup the URL you want to use. Here’s the call:

curl -s \
-H ‘Content-Type: application/json’ \
-d ‘{

This URL will listen for open events. Each time anyone opens your email you will receive an open event like the one we saw above. Then you can either just store the data or trigger an action, such as sending a new email.

See, it is simple! One call and everything is done. Check out our documentation to get started.

Using our interface

We offer the option to configure the webhook from our interface as well. You can do it from the “My account” page, on the section “Rest API”. You’ll need to choose the option “Event tracking (triggers)”


You’ll be able to add one webhook for all events, or set up specific ones for each type of events.


You will be able also to test the URL you specified to ensure it’s working properly. If all goes well, it will return a 200 OK HTTP. Any other HTTP code will result in our server retrying the request later.

Our system will retry following these rules:

  • 10 attempts, with 30 seconds between each attempt;
  • After that:10 attempts, with 30 minutes between each attempt;
  • If none of these attempts work, the URL will be suspended;


Keep an eye on your webhook for any responses other than a 200 OK. 😉

And this is it! You have a functional webhook that can receive your email events. Use this in your configuration to have your own statistics or custom workflows.

Summing Up

Now you know what a webhook is and why this is the easiest way to track any type of events over the web. Just set up your “listener” and decide what to do with the events it catches.

Using Mailjet’s events will help you track everything that happens with your emails. This is the perfect way to clean your lists or to create your own dashboard in your company’s internal application.

If you want to be the first to know about the latest tech trends or how to use Mailjet, follow us on Twitter and Facebook.