Get message id of sent email

528 views
Skip to first unread message

CloudPress

unread,
Mar 20, 2013, 12:53:03 AM3/20/13
to postmark-ap...@googlegroups.com
I am sending outbound emails though postmark and I need to log the message id of sent emails. The only thing I can find in the API documentation is you return this string:

"MessageID" : "b7bc2f4a-e38e-4336-af7d-e6c392c2f817"

The problem is in my test this string has no correlation to the actual Message-ID header of the message and that is what I need. Is there a way to get that?

Milan Gornik

unread,
Mar 20, 2013, 6:14:45 AM3/20/13
to postmark-ap...@googlegroups.com

Hi,

That MessageID info is internal to Postmark. It is unique way to reference that message. For instance, if that message generates a bounce, the two of them will be connected by this MessageID. This information is guaranteed to be unique and is present in every message that Postmark sends.

As you noticed, this is not related to physical email Message-ID header. Physical Message-ID is unfortunately not required by standards nor strictly defined as you can see here: http://stackoverflow.com/questions/831183/is-the-message-id-email-header-unique-for-each-recipient So, you have to be sure that it actually can work for your use case.

Right now, by inserting Server ID and MessageID (Postmark MessageID) into URL you can navigate to web page showing all the info on that email (including full message body with headers). You can check this out by clicking on any message in your Outbound page. However, there is no API yet to support the same thing. It is in one of the immediate iterations, so it should be soon out, but I can't give exact ETA yet. 

Regards,
Milan Gornik
Postmark developer, Wildbit

CloudPress

unread,
Mar 20, 2013, 1:31:36 PM3/20/13
to postmark-ap...@googlegroups.com
We need an automatic way to obtain that, preferably with it just being part of the send message return and not requiring an additional api call but some api method is better that nothing. We log the actual server message-ID to correlate replies using their In-Reply-To or References header, while I am not sure I can rely on all mail clients to send those headers properly it should be consistent enough for our needs. We have considered adding some unique identifier to the outbound message but if the user does not quote our orginal message in their reply there is no way to correlate it, we feel the Message-ID will be more reliable.

JP Toto

unread,
Mar 20, 2013, 1:38:01 PM3/20/13
to postmark-ap...@googlegroups.com
Hello!

We wouldn't be able to return the Message-ID immediately on the API calls because the messages are queued to be sent a few moments after the call. This is usually within a few seconds but still too long to wait for to return on an API response.

We're working on a sent message API like Milan was talking about which would include the Message-ID header from the mail server. At that time it'll be a lot easier to obtain the information you're looking for.

We'll keep our blog updated with all our new features!

JP Toto
Postmark developer, Wildbit

CloudPress

unread,
Mar 21, 2013, 7:53:09 PM3/21/13
to postmark-ap...@googlegroups.com
That would at least be better than nothing to be able to get it in an api call, is that something coming soon because if not I may have to find an email sending service that can support our usecase.
Reply all
Reply to author
Forward
0 new messages