How to get message bodies in metadata?

33 views
Skip to first unread message

Daniela Rodríguez Careri

unread,
Dec 16, 2013, 10:22:29 AM12/16/13
to elasti...@googlegroups.com
Hi Rustam!

We have ElasticInbox configured as:

store_html_message: true
store_plain_message: false


But still when we request messages by labelid with metadata, both plainBody and htmlBody come out as null:

http://mail.example.com/rest/v2/example.com/danita/mailbox/label/1?metadata=true

{
    944e8900-6382-11e3-852b-22000a9887a0: {
        from: [
            { name: "Example.com", address: "in...@example.com" }
        ],
        to: [
            { name: "Danita", address: "dan...@example.com" },
        ],
        cc: null,
        bcc: null,
        subject: "Newsletter #661",
        date: "2013-12-12T18:46:15.000+0000",
        messageId: null,
        size: 22336,
        location: "blob://db/944e8900-6382-11e3-852b-22000a9887a0?c=dfl&b=1",
        plainBody: null,
        htmlBody: null,

        labels: [ 0, 1, 10 ],
        markers: [ "SEEN" ],
        parts: null
    },
    ...
}


What are we doing wrong?

In the client we're developing we need to show a small excerpt of each message listed on the mailbox, so right now for 20 messages per page, we need to do 21 requests: one for the listing and 20 for the message bodies. If EI can be configured to return the bodies along with the metadata we could cut that to just 1 request.

Thanks a lot.

Rustam Aliyev

unread,
Dec 16, 2013, 10:38:43 AM12/16/13
to elasti...@googlegroups.com
Hi Daniela,

Currently it's not supported. The reason why you see plainBody/htmlBody as null is the same bug we have for messageId=null (we discussed that some time ago).

The good news is that it's not the first time we have this request and I'd be happy to implement this asap together with message-id for replies.

Could you please create github request? I think we may need additional flag to specify if response should contain body and if yes which formats. Also, we'll need to trim response bodies somehow but maybe that can be left out for now.

-
Rustam.


--
You received this message because you are subscribed to the Google Groups "ElasticInbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticinbox...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Daniela Rodríguez Careri

unread,
Dec 16, 2013, 12:37:03 PM12/16/13
to elasti...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages