I send emails to template-based contact lists using Mandrill. I would like to track whether the contacts answered my email address, and for this I would like to check whether the Message-Id my sent emails appears in the In-Reply-To header field of new messages.
The problem is that I need to generate and set the Message-Id manually, since Mandrill only gives me its internal _id . However, since I send emails to different contacts at the same time, I set preserve_recipients to false . But then I can install only one Message-Id , which, therefore, will not be globally unique.
Here is an example of the JSON I'm sending:
{ "from_email": " itsme@email.com ", "from_name": "Its Me", "headers": {"Message-Id": ["< 20150528161426.4265.93582@email.com >"]}, "subject": "Thesubject", "text": "Thebody", "to": [ { "email": " john@email.com ", "name": "John", "type": "to" }, { "email": " patrick@email.com ", "name": "Patrick", "type": "to" } ], "preserve_recipients": false
}
In this case, two messages will be sent, but they will have the same Message-Id . If I do not install it, Mandrill will automatically assign it, but I cannot extract it.
Any idea what I can do? Maybe my general approach is wrong ...
source share