Author |
|
i3000 Newbie
Joined: 21 October 2010 Location: Australia
Online Status: Offline Posts: 9
|
Posted: 21 May 2012 at 7:41pm | IP Logged
|
|
|
Hi,
I have been trying to search GMail by MessageId with IMAP to no success. I am obviously doing something wrong. I have tried
imap.Search(true, "UID SEARCH X-GM-MSGID 13584bbb8fc79c9c", System.Text.Encoding.UTF8.WebName)
imap.Search(true, "UID SEARCH X-GM-MSGID 13584bbb8fc79c9c", null)
These fail with "could not parse command"
imap.Search(true, MailBee.ImapMail.ImapUtils.GmailSearch("UID SEARCH X-GM-MSGID 13584bbb8fc79c9c"), System.Text.Encoding.UTF8.WebName)
This just does nothing...
I couldn't find an example anywhere - any advice appreciated,
Paul C
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 22 May 2012 at 1:49am | IP Logged
|
|
|
GMail Message-ID is a 64-bit unsigned integer. 13584bbb8fc79c9c is not.
Regards,
Alex
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 22 May 2012 at 1:50am | IP Logged
|
|
|
Well, 13584bbb8fc79c9c can be considered hexadecimal integer but GMail (and IMAP at all) does not support hexadecimal numbers.
Regards,
Alex
|
Back to Top |
|
|
i3000 Newbie
Joined: 21 October 2010 Location: Australia
Online Status: Offline Posts: 9
|
Posted: 22 May 2012 at 1:55am | IP Logged
|
|
|
Thank Alex - I got the same behaviour using the decimal equivalent 1393947353372434321
i.e.
imap.Search(true, "UID SEARCH X-GM-MSGID 1393947353372434321", System.Text.Encoding.UTF8.WebName)
Is the syntax correct?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 22 May 2012 at 2:14am | IP Logged
|
|
|
Remove UID SEARCH from the search string. Search command itself inserts this into the IMAP request.
Regards,
Alex
|
Back to Top |
|
|
i3000 Newbie
Joined: 21 October 2010 Location: Australia
Online Status: Offline Posts: 9
|
Posted: 22 May 2012 at 2:48am | IP Logged
|
|
|
Great thanks Alex, the following worked
imap.Search(true, "X-GM-MSGID 1393947353372434321", null)
|
Back to Top |
|
|