Tracking the various metrics that relate to message deliverability (e.g. logging recipient server responses) allows you to see what happened to every single email sent from your system. A phone call from a worried client who hasn’t received an electronic invoice won’t cause you to panic, as you can check what happened to it in seconds in the EmailLabs user interface. It may be that the recipient’s mailbox is currently full and the email has been given a temporary status of ‘Deferred’, or you may have entered an address with a typo that caused a bounce – hence the ‘Hardbounce’ status.
To easily search for a specific message, a unique label, which is the Message-ID, must be stuck to it beforehand. However, such analytics at the lowest level, i.e. concerning a single message, is not always sufficient. To be able to look at the results from a broader perspective – e.g. assessing the engagement of recipients through opens and clicks on links – it is worth using tags.
These assign a label to a group of messages which meet the criteria defined by the rules. The results, e.g. for a specific newsletter campaign or certain action in transactional communication (account registration, purchase confirmation), help to draw valuable conclusions and optimize sendings accordingly. Any greater discrepancy between the number of e-mails sent (injected status) and received by the receiving server (ok status), as well as a sudden increase in soft or hard bounces, are clear signs that something worrying is going on.
Find out how you can analyze your mailings in a more sophisticated and aware way with the appropriate Message-ID and tagging of emails.
Message-ID is the unique identifier of a message, which should always be present in the message header. The Message-ID structure looks identical to an email address:
As you can see above, the fixed elements of a valid Message-ID are the characters “@” and “.”.
To ensure the uniqueness of the Message-ID, the timestamp (i.e. the time of the event), the receiving address, the subject or other tagging features can be used to construct it, e.g:
md5(timestamp+receiver_address+sender_address+type_message(newsletter))@mycompany.com
The uniqueness of the Message-ID is very important because, as mentioned in the introduction, it can be used to receive all the information and statistics from the EmailLabs interface relating to a particular email.
Every API method that provides information about a message can use the message_id(msgid) parameter to filter the data. It is not only the ability to retrieve data via API or from the EmailLabs interface that makes it worthwhile to have a valid Message-ID. Spam filters such as SpamAssassin, for example, check headers (including the Message-ID) and score them according to their content – for example:
Message-ID is unusually short MSGID_SHORT
Message-ID contains multiple ‘@’ characters MSGID_MULTIPLE_AT
The number of positive points awarded by SpamAssassin in the above examples is relatively small, but it is still worth ensuring that you do not receive them at all (the lower the score, the better).
Unlike Message-ID, adding tags to an email is not required in any way, but their use allows messages to be tagged for later aggregation.
Adding tags to messages sent via EmailLabs is very simple. Whether the mailing is carried out via API or SMTP, the final data will be the same.
To add tags to messages sent via API, add the tags parameter in the body of the request:
‘tags’ => array(‘system’,’newaccount’)
The above example is a code snippet from PHP, but others are available in our documentation.
The same tags can be added to the message headers when sending via SMTP. Below is an example of a mailing using the PHPMailer library :
$mail->addCustomHeader(‘X-MAILTAGS’, ‘system;newaccount’);x
Regardless of the chosen method of sending the message, you will ultimately see an entry like this in the header section of the email:
X-MAILTAGS: system;newaccount
The information prepared in this way is stored in the EmailLabs panel so that it can be presented to users in aggregated form.
This data can be retrieve via API or viewed in the panel, making it possible to check, for example, the open rate for a given mailing, i.e., a specific tag.
While (as mentioned earlier) Message-ID should always be used, Tags should be created when we know that we need to select specific data in the future. This could be campaign statistics or groups of emails with specific parameters. This is best illustrated by the following examples:
System emails can be labelled with the system tag, and if there are registration emails in this group, they can be additionally marked with another tag – newaccount (as in the previous examples). If there is a need to check the percentage of opens for registration e-mails or system e-mails in general, this can be done very quickly by downloading data only for the group so tagged.
The most common example of using tags is to label each newsletter campaign with a separate tag or a pair of tags, e.g.
newsletter;tagsvsmessageid
newsletter;howtosendmessages
In addition, if the newsletter is sent in Polish and English, a corresponding parameter can be added:
newsletterPL;howtosendmessages
newsletterEN;howtosendmessages
In this way, with just a few clicks, it is possible to see how a particular campaign is received by users (open rate/click rate) and how it compares to all newsletter mailings or other campaigns.
The examples are endless, but at the end of the day, it is always the same – tags aggregate emails into a group, which can be easily analyzed for statistics, then combined into larger groups and so on. How the tagging mechanism is used is up to the user’s imagination.
An interesting concept is to use the tag mechanism as a diagnostic tool to improve the quality of email campaigns. Let’s assume that a mailing is performing poorly in terms of open rates. A recent campaign was given the tag HowToImproveMyEmailCampaigns1. Once you have made corrections, of any kind – whether to the content of the message or after adding mail security features such as SPF, DKIM, and S/MIME, you can tag the next campaign with HowToImproveMyEmailCampaigns2 and compare the results, has what has been changed to improve the quality of the campaign or should something else be done?
Yes, if the message is not related to others or if there is no point in collecting statistics for a particular group of messages. Remember and beware of giving separate tags to each message, as this misses the point. Tags combine messages into groups, so an approach like the following would be inappropriate:
Message 1: tagNewsletter;client1
Message 2: tagNewsletter;client2
Message 2: tagNewsletter;client2
Message 3: tagNewsletter;client
Message 4: tagNewsletter;client
Message 5: tagNewsletter;client5
This makes it difficult to use the tag mechanism properly – the useful tags get lost in the clutter of the useless ones. What if we want information about a specific message? With help comes the Message-ID mentioned earlier, an identifier that provides very precise data about a particular message. Tags are very general but allow for a broader point of view.
It may be the case that someone likes the concept of tags and would love to implement it in their mailings, but can’t do it from the code side, doesn’t employ a programmer and doesn’t have the necessary knowledge themselves. Nothing is lost, as tag messages’ functionality is available directly from the EmailLabs interface.
Under SMTP Accounts > Settings > Tags, you can add the appropriate rules.
The tagging mechanism gives the tag TagsVsMsgid1 to messages that have exactly this line “Tags vs MessageId” in the subject field.
If the subject line looks like this then the tag TagsVsMsgid1 will not be given:
“Hello, you may be interested in our article Tags vs MessageId” or “Tags vs MessageId – what you need to know …. etc.”
If the message has the subject line “Tags vs MessageId – or what you need to know …. etc.”, which is the same subject line as in the example above, the tag TagsVsMsgid2 will be given. Why?
The “*” symbol placed in the “Tags vs MessageId*” rule is important. This symbol means that there may be some additional characters in the subject field of the message beyond the searched “Tags vs MessageId” and therefore the message is to be given the tag TagsVsMsgid2.
Other examples:
Rule “Tags*MsgID” Subject: “TagsVSMsgID” Tagged? Yes
Rule “TagsVSMsg*” Subject: “TagsVSMsgID” Tagged? Yes
Rule “*giVSMsgID” Subject: “TagsVSMsgID” Tagged? Yes
Rule “TagsVSMsgID” Subject: “TagivsMsgID” Tagged? No
Rule “TagsVSMsgID” Subject: “TagsVSMsgID !” Tagged? No
In the rule “[email protected]”, the sending address of the message, i.e. the from field, is important.
When constructing rules relating to the field, the “*” symbol will not work.
It is almost identical to rule no. 1, except that – if the message is sent from the address “[email protected]” and with the subject “Great newsletter that will interest everyone”, the message will receive two tags (“newsletter” and “campaign1”). This will enable the aforementioned comparison of results.
Message analytics can be simpler if you tag your emails in the right way. The Message-ID must always be present – in the right form and as a unique label so that it can be used to extract detailed and precise information about a particular message. Tags are used to bundle messages into groups and aggregate data on messages that meet the rules specified. They are optional and do not have to be included in the headers of emails, but their appropriate use can simplify the tracking of key metrics and, as a result, improve the effectiveness of mailings.
We are proud to announce that Vercom S.A., the company behind the EmailLabs project, successfully passed an audit for compliance with the latest ISO/IEC 27001:2022 and ISO/IEC 27018:2019 standards....
Gmail has announced significant changes in the requirements for email senders to maintain a good reputation and proper classification of messages in user inboxes starting from February 1, 2024....
The increasing number of phishing attacks each year, and the projection that this trend will continue to escalate, aren’t likely to astonish anyone. This can be attributed, in part,...
Out of all the things that can go wrong when sending out marketing emails, having your emails end up in the recipient’s spam folder is arguably the most dreaded...
Email Authentication, Security
DMARC is an email authentication protocol that is designed to give domain owners the ability to protect their domain from unauthorized use, commonly known as email spoofing. Spoofing occurs...
With the emergence of the Covid-19 pandemic, many brands have been challenged to adapt in a short period to the changed reality and new consumer attitudes. That meant reorganizing...
Are you frustrated with the constant struggle of your emails getting blocked by Gmail? Have you ever wondered about the reasons behind this issue and, more importantly, how to...
In the ever-evolving landscape of email management, Google has announced an exciting upgrade to Gmail’s summary cards, aimed at improving user experience and streamlining inbox navigation. The latest enhancements,...
Entering the world of email communication, you’ll encounter many terms that initially seem straightforward and intuitive. However, some of these can be pretty challenging. Accurately distinguishing between them is...
Are you frustrated with the constant struggle of your emails getting blocked by Gmail? Have you ever wondered about the reasons behind this issue and, more importantly, how to...
In the ever-evolving landscape of email management, Google has announced an exciting upgrade to Gmail’s summary cards, aimed at improving user experience and streamlining inbox navigation. The latest enhancements,...
Entering the world of email communication, you’ll encounter many terms that initially seem straightforward and intuitive. However, some of these can be pretty challenging. Accurately distinguishing between them is...
Attaching a folder to an email may seem complicated at first glance, especially if you’re trying to send multiple files or an entire project’s documents to a colleague or...
Best practices, Deliverability
In today’s digital age, email has become an integral part of our personal and professional communication. We rely heavily on emails to send important messages, documents, and updates. But...
We are proud to announce that Vercom S.A., the company behind the EmailLabs project, successfully passed an audit for compliance with the latest ISO/IEC 27001:2022 and ISO/IEC 27018:2019 standards....
Best practices, Deliverability
Are you struggling to improve the deliverability and engagement of your email marketing campaigns? Look no further than email subdomains. You can protect your root domain and effectively manage...
What is the darknet? Shrouded in mystery for many years and often associated with ominous connotations, the darknet is a part of the internet that evokes curiosity, fascination, and...
A few weeks ago, at Vercom, we began the process of implementing the NIS2 Directive and preparing to meet the requirements of the Digital Operational Resilience Act (DORA). What...