How to get gmail threadid using imap xoauth
Asked Answered
B

2

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

Biebel answered 7/3, 2011 at 13:26 Comment(4)
Why do you think that greplin is using IMAP to get Gmail thread IDs?Kennard
I given only one oAuth access and I think to access mails we need to use gmails xoauth, may be I am wrong.Biebel
Doesn't the thread you linked say that they get the data via the atom feed?Kennard
Atom feed will give only unread messages!Biebel
A
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/

Aetiology answered 6/4, 2011 at 10:25 Comment(1)
Just FYI, I've posted an example of how to get it using PHP and Zend Mailer in https://mcmap.net/q/1626507/-quot-x-gm-thrid-quot-via-imap-php. Hope it helps!Champaigne
H
-2

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

Housewife answered 5/4, 2011 at 5:49 Comment(5)
@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.)Aetiology
@user691595 and one more thing . It does not use imap . See the thread "It is about using imap protocol not using curl login"Aetiology
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?Housewife
@uid 1 is for your first email in your account. check with your latest message.Aetiology
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 echo dechex(1327644190303473294); //return's 126cbd5b5f264e8eHousewife

© 2022 - 2024 — McMap. All rights reserved.