1

I'm trying to find a way how to display message in gmail (using its gui) using url and messageID passed somewhere maybe in query string. I think it should look like this. https://mail.google.com/mail/?shva=1#inbox/messageID I know that each message has a unique url for example : https://mail.google.com/mail/?shva=1#inbox/132aa50e42798b61 - but I do not know how to programatically determine the identifier 132aa50e42798b61. What Im doing is retrieving messages list via Javax.mail - but I do not want to retrieve the entire content of mail message using java- I'd rather prefer to use gmail gui to display selected message.

If anyone has an idea how to display message in gmail using messageID or another identifier which is a part of message, please help.

voytech
  • 380
  • 3
  • 13

1 Answers1

3

You can only display entire conversation in Gmail, not a single message.

Gmail link that points to the conversation looks like this:

https://mail.google.com/mail/u/0/#inbox/13216515baefe747

“13216515baefe747″ is the Gmail thread-ID in hex.

To dermine the thread-Id using IMAP you need to use X-GM-THRID extension (http://code.google.com/apis/gmail/imap/#x-gm-thrid) and convert the result to hex.

IMAP conversion looks more or less like this:

Mail.dll:  6 10:07:49 C: c39dcdd3ce84473a UID FETCH 10350 (UID X-GM-THRID)
Mail.dll:  6 10:07:49 S: * 1 FETCH (X-GM-THRID 1381181440384575604)
Pawel Lesnikowski
  • 6,264
  • 4
  • 38
  • 42