| Author |  | 
      
        | NobodyFamous Newbie
 
  
  
 Joined: 19 October 2007
 Location: Canada
 Online Status: Offline
 Posts: 11
 | 
          Hi,
           | Posted: 28 September 2009 at 7:14am | IP Logged |   |  
           | 
 |  
 I'm currently using Imap with gmail.  Working great, but I do have a question.  When performing an EXAMINE command on a folder, gmail's imap servers will return in the response something like [UNSEEN 4]  to indicate the number of unseen messages in the folder that the EXAMINE command was issued for.  However, if the UNSEEN count for the folder is 0, that line is completely omitted in google's response to the EXAMINE command (eg: [UNSEEN 0] is NOT returned, it's just left out, so you can assume unseen=0).
 
 My question is, does mailbee's imap component update the Unseen property on the Imap object when ExamineFolder is called?  Does it update the Unseen property in both cases, where google DOES include [UNSEEN 4] and when [UNSEEN 0] is NOT included (so Unseen property should = 0 in that case)?
 
 I'm trying to avoid doing an additional SEARCH UNSEEN NOT DELETED command just to get the count of the messages with the unseen flag.
 
 Thanks!
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Andrew AfterLogic Support
 
  
 
 Joined: 28 April 2006
 Location: United States
 Online Status: Offline
 Posts: 1189
 | 
          According to IMAP RFC, [UNSEEN 0] is obligatory and we don't update Imap.Unseen in case of lack of that response part. We recommend you to contact GMail support regarding this issue.
           | Posted: 28 September 2009 at 7:46am | IP Logged |   |  
           | 
 |  
 Best regards,
 Andrew
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Andrew AfterLogic Support
 
  
 
 Joined: 28 April 2006
 Location: United States
 Online Status: Offline
 Posts: 1189
 | 
          IMAP protocol requires sending [UNSEEN XXX] response by server always when number of unseen messages changes.
           | Posted: 28 September 2009 at 7:53am | IP Logged |   |  
           | 
 |  
 Even if we add processing the lack of [UNSEEN 0], it may cause a bug in other cases when number of unseen messages was not actually changed.
 
 Best regards,
 Andrew
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | NobodyFamous Newbie
 
  
  
 Joined: 19 October 2007
 Location: Canada
 Online Status: Offline
 Posts: 11
 | 
          So how is it handled now when [UNSEEN 0] is not included?  is the unseen property simply not changed in the mailbee Imap object?
           | Posted: 28 September 2009 at 7:58am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | NobodyFamous Newbie
 
  
  
 Joined: 19 October 2007
 Location: Canada
 Online Status: Offline
 Posts: 11
 | 
          Sorry didn't read close enough.. You don't update the Unseen count in that case... I'll contact gmail and see if they can fix this.
           | Posted: 28 September 2009 at 8:01am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  |