Thursday, April 28, 2011

New Feature: Preserve the Message-ID in Transactional Emails

JangoMail now has a new checkbox on the Settings --> SMTP Relay page, that allows you to preserve the original Message-ID of an email sent via the SMTP relay. By default, the Message-ID is overwritten by the JangoMail system Message-ID.

Here is an example of a JangoMail system Message-ID:

Message-ID: <>

It's a unique number followed by We have received a few requests from JangoMail clients to preserve the original Message-ID of the message transmitted through the relay instead of overwriting it with the JangoMail system generated Message-ID. For example, an email sent using Mozilla Thunderbird has a Thunderbird-generated Message-ID that looks like:

Message-ID: <>

In this example, Mozilla Thunderbird's Message-ID contains a unique string of alphanumeric characters and uses the domain of the receiving email address. If you check the Preserve Message-ID box, this will also be the Message-ID in the final email delivered to the recipient. If you leave this box unchecked, this Message-ID will be replaced by the JangoMail system Message-ID.

Calling the API directly

If calling the transactional email API directly via the SendTransactionalEmail method, you can specify a custom Message-ID in the Options parameter using the CustomHeaders attribute:



Why is this useful?

The new Preserve Original Message-ID setting grants you full control of the Message-ID header value. This is useful if you have a custom reply management system in place, such that responses and bounces can be tagged with their original Message-ID.