Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Gmail MessageId IMAP Search Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
i3000
Newbie
Newbie


Joined: 21 October 2010
Location: Australia
Online Status: Offline
Posts: 9
Posted: 21 May 2012 at 7:41pm | IP Logged Quote i3000

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 View i3000's Profile Search for other posts by i3000
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 22 May 2012 at 1:49am | IP Logged Quote Alex

GMail Message-ID is a 64-bit unsigned integer. 13584bbb8fc79c9c is not.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 22 May 2012 at 1:50am | IP Logged Quote Alex

Well, 13584bbb8fc79c9c can be considered hexadecimal integer but GMail (and IMAP at all) does not support hexadecimal numbers.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
i3000
Newbie
Newbie


Joined: 21 October 2010
Location: Australia
Online Status: Offline
Posts: 9
Posted: 22 May 2012 at 1:55am | IP Logged Quote i3000

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 View i3000's Profile Search for other posts by i3000
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 22 May 2012 at 2:14am | IP Logged Quote Alex

Remove UID SEARCH from the search string. Search command itself inserts this into the IMAP request.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
i3000
Newbie
Newbie


Joined: 21 October 2010
Location: Australia
Online Status: Offline
Posts: 9
Posted: 22 May 2012 at 2:48am | IP Logged Quote i3000

Great thanks Alex, the following worked

imap.Search(true, "X-GM-MSGID 1393947353372434321", null)
Back to Top View i3000's Profile Search for other posts by i3000
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide