MessageID on send?

824 views
Skip to first unread message

Drew J

unread,
Aug 8, 2012, 11:14:29 AM8/8/12
to mandrill-a...@googlegroups.com
I'm just diving into the Mandrill API, and one of the first things I noticed was that after sending an email... all that is returned on success are the email (sent to) and status.

I may just be my background, but do messages not have a unique ID of some kind?  I only ask because what I have done in the past, is that if a messages status is "queued" or "rejected"... it's nice to query back for more information about the specific email that was tried for delivery.  

As it is, all I can find are general search features that I can use to perhaps perform a search to narrow down the results to the email that was sent.  This is difficult though if several transactional emails are sent in a short amount of time, etc.

For example, with AmazonSES and PostmarkApp, they give each transactional email sent a MessageID that you can then search and match up against to identify problems, etc.

Just curious if there's a better workflow that perhaps I'm overlooking.  Thanks!

Drew J

unread,
Aug 8, 2012, 11:28:56 AM8/8/12
to mandrill-a...@googlegroups.com
I should add, just found this post explaining this issue a bit: https://groups.google.com/d/msg/mandrill-api-discuss/QxyQepivhug/s6K0JoEgKaYJ

But I do have a question about searching via metadata.  Is this somewhere in the docs that I'm just overlooking?

Thanks!

Kaitlin

unread,
Aug 9, 2012, 8:06:31 PM8/9/12
to mandrill-a...@googlegroups.com
Right now, no message ID is provided in response to an API call to send because one hasn't yet been given to the message. It happens later in the process.  However, we're looking at changing that to assign an id earlier.  All the webhooks, including the 'sent' event, include the unique id, though, so you can match things between the various webhook events.

We're still working to document the various ways you can search and beef up metadata. Mandrill supports Lucene queries for searching in the application or via the API, including single and multiple-character wildcards (just don't start a query with a wildcard) and boolean operators. For custom metadata fields that you're indexing, the field name for searching takes the form of u_yourfieldname for searching.  In the search box in the app, you could search for something like this if your field is called 'userid' and you want to search for values starting with 111:

u_userid:111*

Other field names include 'full_email' for the recipient email address, 'subject' for the subject line, 'opens.ts' (a range search that would allow you to search for open timestamps in a given range), and 'url'.  With the url, you could search something like 'url:twitter.com*' to search for messages where users clicked on a link that started with twitter.com.

Feel free to send us an email via the form at help.mandrill.com if you have other questions.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages