While API method to get "Reply-To" address from email message rather than contact email address?

77 views
Skip to first unread message

Torin Walker

unread,
Jan 4, 2016, 10:20:00 AM1/4/16
to InboxSDK
I downloaded a chrome extension called "Batch Reply" for Chrome (gmail), only to find that when batch-replying to paypal members, the extension derives the contact address (the "From" field) rather than the "Reply-To" address. I've downloaded the source code for this extension and see that the source shows:

var emails = [];
    for (var contact in contacts) {
      var email = contacts[contact].emailAddress;
      if (email === sdk.User.getEmailAddress()) {
        continue;
      }
      ...
}

It seems to me that if we're iterating over checkbox-selected email objects, one would be able to introspect the email object itself and derive directly from the "reply-to" field. Threads would be arrays of email objects, so I'd expect to gather a proper email list with (pseudo code):

var emails = [];
emailThreads = getSelectedEmailThreads();
    for (var emailThread in emailThreads) {
      var emailAddress = emailThread[0].getReplyToFieldValue()
      emails.push(emailAddress);
      ...
}

Can you provide some advice on the best way to approach this? Iterating over contacts to derive email addresses from email objects seems a little counter-intuitive.


Torin...

Chris Cowan

unread,
Jan 4, 2016, 10:07:39 PM1/4/16
to InboxSDK
Where is the contacts object coming from? Are you querying a ComposeView, ThreadView, ThreadRowView, or MessageView? I don't think there's enough code here to help yet.
Reply all
Reply to author
Forward
0 new messages