Email Categories

Mailtrap uses categories to help you to tell the difference between various types of emails. As a result, this allows you to delve deeper into the performance of your emails and see the statistics for a specific group of emails, rather than all of the messages sent out from your account.

Although categories are not obligatory and emails can be sent without them it makes sense to use categories due to the many benefits as discussed below. 

Why should you use categories?

Categories are very beneficial in a multitude of situations. They help you:

  • See transparent statistics for each type of email you send.
  • Analyze key metrics of each category, such as open, click, or bounce rates. A single underperforming category can influence your overall sender reputation
  • Compare different types of emails and know straight away which perform better. A/B test different iterations and compare the metrics next to each other.
  • Debug specific templates when, for example, an open rate suddenly drops. Drill down into specific messages sent out within a campaign via Email Logs, preview them, check spam scores, and others.
  • Simplify the search for any particular message. Filter out only emails matching a certain category to narrow down the results.
  • Monitor which emails are sent. Quickly notice when any previously disabled emails are sent out.

How you use categories is up to you. They’re commonly associated with features, types of messages, or specific groups of customers. For example, they could be:

  • “Feature XYZ intro”
  • “Password reset 1st email”
  • “Test A Order Confirmation”
  • “Downgrade flow Tier 1”
  • “Onboarding Msg 3”
  • “Newsletter 04/20”

and many many others.

Basics of categories

You specify categories when creating an email to be sent with Mailtrap, by inserting a category name into the X-MT-Category header.

For example, here’s the cURL example of a test message you may send to confirm your domain:

curl --location --request POST \
'https://send.api.mailtrap.io/api/v1/sg_send' \
--header 'Authorization: Basic YXBpOjgxGDYxYjg4ZTSlSGQ2MjQyNTFhMzk1MmNhY2N3ZTJh' \
--header 'Content-Type: application/json' \
--data-raw '{"personalizations":[{"from":{"email":"from@test.com","name":"From Name"},"to":[{"email":"your_email@example.com"}],"subject":"You are awesome!"}],"headers":{"X-MT-Category":"Integration Test"},"content":[{"type":"text/plain","value":"Congrats for sending test email with Mailtrap!"}]}'

Notice the X-MT-Category header - it indicates that an email should be grouped into the Integration Test category.

At this point, categories can only be specified when sending an email. Once you add one to an email and a message is sent, the category will appear in Mailtrap - in the Email Logs’ filters as well as in statistics. 

Categories cannot be removed or modified at this point. There’s no limit as to how many categories you can have on your account.

Analyzing email performance by category

Categories can be tracked via the Email Categories tab in the menu. You’ll also get a glimpse of them in a more general Stats menu.

If no categories have been set up yet, you’ll see the following screen in the Email Categories menu:

Once a few categories have been set, and some emails have been dispatched, the table will start to look a lot more colorful:

You can filter out the data for specific domains or mailbox providers using the filters above. You can also limit the number of domains displayed and compare statistics only for some of them.

Domains dropdown list contains all the domains that have been added to your Mailtrap account - regardless of whether they were verified or not. It also includes domains that have been deleted - the stats for them are still available. Use this filter to focus only on the emails sent from a specific domain.

Mailbox Providers are software solutions that were used to receive your emails. Some examples include Google, Yahoo!, or Office 365, but also GoDaddy or Amazon SES. Using this dropdown menu, you can only filter out some of the providers and see all of the categories they have been involved in.

Finally, in the last dropdown list, you can see all the categories used with your account. You can, for example, pick a few of them and see how their stats compare. It’s particularly helpful when A/B testing, monitoring the performance and debugging deliverability issues.

You can choose to view stats in three views - table (default), charts, and timeline.

When in the Table view, you’ll see all the core stats for each category. If you’re confused about either of the metrics, check our article on statistics for more information and examples.

Mailtrap uses color-coding to highlight good, bad, and average results, compared to the benchmarks set by our cross-industry research. You can disable it with a respective toggle.

In the Charts view, you can, of course, see charts demonstrating the performance of your emails. By default, stats for all emails are shown so it makes sense to start your analysis by selecting a category (or a few) from the dropdown menu.

Note that at this point Mailtrap tracks statistics for each day separately which can sometimes lead to, for example, open rates going into hundreds of percent. This is not a bug, it’s a feature ;-)

Let’s look at an example. Unique open rate is calculated by dividing unique opened emails by unique deliveries. So, when 100 emails are delivered on Monday, 100 on Tuesday, and another 100 on Wednesday; somehow, all 300 emails were only opened on Wednesday for the first time. This will lead to a sudden spike on a chart because the unique open rate for that day will be 300%.

We cover how stats are calculated in more detail in a dedicated article mentioned earlier.

The third, Timeline view, shows you the stats for a chosen category(ies), broken down into each day when any event was recorded (open, click, bounce, unsubscription, etc). As was the case for Charts, it’s best to select specific categories as otherwise you’ll be looking at all the emails sent from your account.

Still need help? Contact Us Contact Us