| Author |  | 
      
        | everydaypanos Newbie
 
  
 
 Joined: 30 October 2011
 Location: United States
 Online Status: Offline
 Posts: 3
 | 
          Hi,
           | Posted: 30 October 2011 at 4:12am | IP Logged |   |  
           | 
 |  I am a newbie with IMAP and I am stuck:
 According to this article http://code.google.com/apis/gmail/imap/#x-gm-labels
 Gmail supports some custom IMAP commands.
 
 I would like to download a list of messages from my Gmail account and have some extra headers about each message. I want to know the folders in which each message belongs to(X-GM-LABELS). And maybe it's thread-id(X-GM-THRID).
 
 I experimented with the code below but no luck.
 Dim e As EnvelopeCollection = MyIMAPConnectionToken.DownloadEnvelopes(MyCustomRange, False, EnvelopeParts.BodyStructure Or EnvelopeParts.MessagePreview Or EnvelopeParts.InternalDate Or EnvelopeParts.Flags, BodyBytesSize, New String() {"X-GM-THRID"}, New String() {"X-GM-THRID"})
 
 Can sb plz point me to the right direction? What property of the Envelope Class do I need to scan for the results? .ExtraHeaders? .MessagePreviewRawHeader?
 
 Thanks.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Can you provide us with a log file of IMAP session? It would allow us to check if those data are actually sent, and if yes, we'll be able to suggest how to obtain those with MailBee.
           | Posted: 31 October 2011 at 3:13am | IP Logged |   |  
           | 
 |  
 If you'd rather not post the log in public forum, you can open a ticket in our HelpDesk, be sure to include a link to this forum page in that case.
 
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | everydaypanos Newbie
 
  
 
 Joined: 30 October 2011
 Location: United States
 Online Status: Offline
 Posts: 3
 | 
          ...
           | Posted: 31 October 2011 at 4:03am | IP Logged |   |  
           | 
 |  [13:02:05.39] [RECV] * 5 FETCH (X-GM-LABELS ("\\Inbox" "\\Important" Nutriworld) UID 5 RFC822.SIZE 336230 INTERNALDATE "23-Sep-2010 08:50:34 +0000" FLAGS (\Flagged \Seen) BODYSTRUCTURE ((("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 1719 44 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 3961 103 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY" "----_=_NextPart_002_01CB5AFC.5E359C4A") NIL NIL)("IMAGE" "BMP" ("NAME" "ole0.bmp") NIL "Afbeelding (Apparaatonafhankelijke bitmap)" "BASE64" 328123 NIL NIL NIL) "RELATED" ("BOUNDARY" "----_=_NextPart_001_01CB5AFC.5E359C4A" "TYPE" "multipart/alternative") NIL NIL) BODY[TEXT]<0> {1666}\r\n
 [13:02:05.40] [RECV] This is a multi-part message in MIME format.\r\n\r\n------_=_NextPar ... n, printen of=20\r\nkopieren van dit bericht is niet toegestaan. N [Literal of length 1666.]
 [13:02:05.41] [RECV]  BODY[HEADER] {1638}\r\n
 [13:02:05.42] [RECV] Delivered-To: customerservice@anamo.gr\r\nReceived: by 10.220.178. ... up" <Marianne@nutriworld.nl>\r\nTo: <customerservice@anamo.gr>\r\n\r\n [Literal of length 1638.]
 [13:02:05.43] [RECV]  BODY[HEADER.FIELDS (X-GM-LABELS)] {4}\r\n
 [13:02:05.47] [RECV] \r\n\r\n [Literal of length 4.]
 [13:02:05.52] [RECV] )\r\n [Total 4025 bytes received.]
 [13:02:05.52] [RECV] * 6 FETCH (X-GM-LABELS ("\\Inbox" "\\Important") UID 7 RFC822.SIZE 3420 INTERNALDATE "19-Sep-2011 07:49:22 +0000" FLAGS (\Flagged) BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 1568 38 NIL NIL NIL) BODY[TEXT]<0> {1568}\r\n
 [13:02:05.54] [RECV] \r\nSee here the new login for our website:\r\n\r\nwww.bestbuysuppleme ... =0A=0A*Denk aan het milieu voordat u dit e-mailbericht afdrukt\r\n [Literal of length 1568.]
 [13:02:05.55] [RECV]  BODY[HEADER] {1832}\r\n
 [13:02:05.56] [RECV] Delivered-To: service@anamo.eu\r\nReceived: by 10.229.38.68 with S ... uysupplements.nl>\r\nTo: "Anamo.eu Service" <service@anamo.eu>\r\n\r\n [Literal of length 1832.]
 [13:02:05.56] [RECV]  BODY[HEADER.FIELDS (X-GM-LABELS)] {4}\r\n
 [13:02:05.57] [RECV] \r\n\r\n [Literal of length 4.]
 [13:02:05.57] [RECV] )\r\n [Total 3723 bytes received.]
 [13:02:05.58] [RECV] MBN00000004 OK Success\r\n [Total 24 bytes received.]
 [13:02:05.58] [INFO] Envelopes downloaded
 
 
 I can clearly see the data. How do I access them?
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Thanks. You can get the value of an extra item like shown below:
           | Posted: 31 October 2011 at 8:41am | IP Logged |   |  
           | 
 |  
 
| Code: 
 
    
    | 
      
       | Dim s As String = CType(e(0).GetEnvelopeItem("X-GM-THRID", False), String)
 
 |  |  |  
 Note that you need to pass only extraItems array, extraHeaders is not needed here as X-GM-THRID is not a message header.
 
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | everydaypanos Newbie
 
  
 
 Joined: 30 October 2011
 Location: United States
 Online Status: Offline
 Posts: 3
 | 
          That's what I call customer service!
           | Posted: 01 November 2011 at 12:09am | IP Logged |   |  
           | 
 |  
 MailBee is awesome.
 | 
       
        | Back to Top |     | 
       
       
        |  |