7

I read this Find Gmail url-IDs via IMAP, but I noticed Greplin (https://www.greplin.com) is able to get thread id successfully.

Can anyone help me here?

Regards, Manoj

Community
  • 1
  • 1
ManojMarathayil
  • 712
  • 11
  • 28

2 Answers2

6

Gmail provides An attribute

"X-GM-THRID"

for thread id

you can use imap fetch function for getting thread id .

see documentation here http://code.google.com/apis/gmail/imap/

Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
  • Just FYI, I've posted an example of how to get it using PHP and Zend Mailer in http://stackoverflow.com/a/19289923/1079109. Hope it helps! – Gabriel Gcia Fdez Oct 10 '13 at 07:51
-2

I think that is can be access via libgmailer.php (curl) http://sourceforge.net/search/?q=libgmailer

Shkur
  • 379
  • 3
  • 10
  • @user691595 I found this thread interested so I tried with libgmailer.php but I am getting these error Fail to connect because: Gmail: Invalid request. (libgmailer: Gmail seems to have changed the URL again.) – Vivek Goel Apr 06 '11 at 07:42
  • @user691595 and one more thing . It does not use imap . See the thread "It is about using imap protocol not using curl login" – Vivek Goel Apr 06 '11 at 07:45
  • I tried to run openssl s_client -crlf -connect imap.gmail.com:993 . FETCH 1:4 (X-GM-THRID) * 1 FETCH (X-GM-THRID 1327644189674155015) * 2 FETCH (X-GM-THRID 1327644190303473294) * 3 FETCH (X-GM-THRID 1327644189818844987) * 4 FETCH (X-GM-THRID 1341989198080663261) . OK Success But in gmail web interface 1st msg uid look's like this 12f0d9019b80216a Any ideas? – Shkur Apr 15 '11 at 14:20
  • @uid 1 is for your first email in your account. check with your latest message. – Vivek Goel Apr 15 '11 at 15:07
  • 1
    DONE! :) 1327644190303473294 is decimal value. If we want to use it in URL we need to convert it to hexadecimal value. Do not trust javascript online calculator and do it on x_64 mashines. [link](http://code.google.com/intl/ru-RU/apis/gmail/forum.html?place=msg%2Fgoogle-apps-gadgets-api%2FA0FpZ8LF_Ag%2FcwsXerakQFkJ) `echo dechex(1327644190303473294); //return's 126cbd5b5f264e8e` – Shkur Apr 18 '11 at 07:27