Message & Mailing/Campaign IDs

SocketLabs On-Demand enables advanced reporting and tracking of your messages by allowing you to tag them with your own user-defined Message and Mailing/Campaign identifiers. Two identifiers are supported: MessageId and MailingId.

The Message ID is typically used to identify a specific message or a recipient of a message. The Mailing ID is typically used to identify a batch, job, campaign, or other group of messages. These identifiers are exposed by the API to help you match email events with source data. Many of the reports can also be broken down or grouped by Mailing ID.

To tag your outbound messages with these identifiers, include this data in standard email headers. The following headers are supported:

X-xsMessageId

  • Specifies a message id. Valid characters include 0-9, A-Z, a-z and hyphen.

X-xsMailingId

  • Specifies a mailing/campaign id. Valid characters include 0-9, A-Z, a-z and hyphen.

WARNING: The X-xsMailingId value should be used as a grouping code and should not be set to a value that changes with every message.

For identifiers that change with every message, use the X-xsMessageId header instead. Using X-xsMailingId values that change with every message can cause various problems such as delivery and processing delays and the loss of reporting and API features and abilities.

Here are examples of what the headers should look like:
X-xsMessageId: Cust1
X-xsMailingId: SignupForm

Note: When a message is sent by our system the values are encoded into the return path address using VERP

Also note that, since there are limitations to the size of an email address, the values you use should be as short as possible. The total size of both values should be 30 characters or less, if possible.

Message IDs and Mailing/Campaign IDs can be specified in an outbound message's header. These identifiers remain with messages throughout their lifetime and are reported in the logs and plugin API events to help you match events with source data.

When bounce processing is enabled these IDs are added to the return path (enveloped sender) using Variable Envelope Return Path (VERP)?. Because of this, the length of these values should be as short as possible. The original SMTP specifications set a maximum to 64 characters, though most mail servers today will accept messages with user data larger then this. It is still a good idea to try and get as close to this as possible. For example, instead of using a GUID for the Message ID you may want to use an incremental number, and instead of using something like "NEWUSERSIGNUP" as the Mailing ID you may want to use "NUS".