Product

Message-level email tracking and more!

Mailgun users can enable/disable tracking on a per-message level by adding a special X-Mailgun-Track MIME header. Read more...

PUBLISHED ON

PUBLISHED ON

Talk about a throwback; this was posted on August 29, 2011!

Good news everyone! Mailgun is migrating to a new and more powerful email pipeline, please expect a stream of exciting announcements very soon.

Message-level tracking

For starters, we have added the option to fune-tune message tracking. Now Mailgun users can enable/disable tracking on a per-message level by adding a special X-Mailgun-Track MIME header. Set it to “yes” if you want this message to be tracked, or “no” if you wish to turn tracking off. Message level setting overrides domain-level tracking. Enjoy!

Here’s an example of how a raw MIME message looks with a message-level tracking enabled:

To: The World From: Mailgunners Subject: Message-level tracking demo X-Mailgun-Track: yes

Custom user variables

When sending messages, you can now submit a JSON-dictionary of user-defined key-value pairs. Those variables will be passed back to your web application via Mailgun webhooks. This allows Mailgun users to build more sophisticated and flexible analytics on their end. Read more about webhooks and custom variables here.

Note that MIME allows you to have multiple headers with the same name, in that case Mailgun will merge your dictionaries as shown in this example:

To: The World From: Mailgunners Subject: User-defined variables demo X-Mailgun-Variables: {"first_name": "John", "last_name": "Smith"} X-Mailgun-Variables: {"my_message_id": 123}

When one of tracked events happens with message, Mailgun will post the following parameters via HTTP POST into your app: firstname, lastname and mymessageid.

Let's talk email

Learn about our deliverability services

See what you can accomplish with the world's best email delivery platform and experts at your disposal.

Related readings

An expanded Mailgun product suite to transform email deliverability

Today marks a special day for Sinch Mailgun. For over a decade, our focus has been to provide the best email experience for businesses all around the world. Now, we take...

Read more

Privacy, automatic engagements, and Mailgun’s bot detection

Now more than ever, users are concerned about their data privacy and what steps they can take to protect their personal information. And that’s something big players in the tech...

Read more

How does Mailgun keep your emails protected?

On the surface, email seems relatively harmless – but dig a bit deeper and you’ll discover there’s a treasure trove of personally identifiable information (PII) at risk. This risk...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon