02 Sep 2009 @ 10:56 AM 

So within the last few minutes i figured out why i was seeing wrong results when processing the flags for a message. Originally i was getting the flags as part of the message header using an IMAP command like this:

UID FETCH [message uid here] (FLAGS BODY[HEADER])

And it did return the flags, but not accurate ones. In the case of GMail, for every message, regardless of its read/unread status in the UI, the \Seen flag would be returned. This coupled with the fact that the default value for the Seen flag in the Message was true, resulted in every message appearing as though it is new. Not cool.

The solution was to request the message flags separate from the header like this:

UID FETCH [message uid here] FLAGS

Sending this command returns the correct flags, or in the case of a new message, no flags. The only drawback to his approach is the fact that another roundtrip to the server must be performed for each message, minor additional overhead, but additional overhead nonetheless.

Now that the new message detection code is working i can implement a nice quick method of checking for new messages with appropriate callbacks and whatnot. Follow me on twitter @Atmospherian to get updates when i check-in the code.

Posted By: Atmospherian
Last Edit: 02 Sep 2009 @ 10:56 AM

EmailPermalinkComments (0)
Tags
Categories: C#, InterIMAP, Projects
 30 Aug 2009 @ 11:32 AM 

I know it’s been a while since i’ve posted about InterIMAP and i want to let everyone know that i am planning to continue work on it, fixing bugs and adding features.

Based on the issues and discussions that have been posted on the codeplex site, it seems that some people are still using the old code base in the Synchronous folder tree. This branch will be marked as deprecated going forward as i will not be maintaining it anymore. The asynchronous branch contains far better code, and even supports performing operations in a synchronous manner (blocking the calling thread until the operation completes) so there is no reason to use the old code.

Through some basic testing i did on the code to see what state it is in, i noticed that the new message flag detection code was not working properly, marking messages as new that weren’t necessarily so. This will be the first area I will work on correcting as i recall the message flags that the server returns can vary from server to server (as most things with IMAP tend to be). Once i can correctly determine if a message is new or not i will work on implementing a quick and easy way of checking for new messages either in all folders, or in a specific folder only.

I encourage everyone who uses the library to submit any requests or bugs they find either on this blog or on the codeplex site so that they can be incorporated into the code.

Posted By: Atmospherian
Last Edit: 30 Aug 2009 @ 11:32 AM

EmailPermalinkComments (3)
Tags
Categories: C#, InterIMAP, Projects
 09 Apr 2008 @ 2:38 PM 

It’s official. I’ve received the blessing of Rohit Joshi to continue his work on his C# IMAP client library he posted over at codeproject.

I’ve created a project at codeplex to host the library and its code. You can find it here: http://www.codeplex.com/InterIMAP

Some major features that i will be adding to the library include:

  • Complete object model for folders, messages, content (including attachments)
  • Support for SSL connections (Complete)
  • Support for saving file attachments to the file system, or any other Stream
  • Support for getting the list of folders on the server and getting the UIDs of the messages in each folder
  • Being able to do all of the above with a few API calls as possible
  • The ability to send a raw IMAP command to the server and retrieve the response. Useful for customizing the behavior of the library.

I am really excited about this opportunity to contribute to the open-source community. Hopefully people will find this library useful and maybe help contribute to it and make better.

Posted By: atmospherian
Last Edit: 09 Apr 2008 @ 02:38 PM

EmailPermalinkComments (0)
Tags
Tags: , , , ,
Categories: C#, Projects
Change Theme...
  • Users » 4
  • Posts/Pages » 25
  • Comments » 29
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About Me



    No Child Pages.

Projects



    No Child Pages.

Downloads



    No Child Pages.