jump to navigation

InterIMAP Progress Update #4 April 29, 2008

Posted by atmospherian in InterIMAP.
Tags: , ,

Here is a break down of this weeks updates to the library:

Configuration Editor (Window app)
I created a simple Windows application that can be used to create and edit configuration files for the InterIMAP library. This should make it much easier to create and manage configuration files.

Local Data Cache Update
So the local data cache has been coming along pretty well. I can now successfully save and load data from the cache and use it to populate the object model upon startup. This is great, however there is much left to be done. For example, there is no synchronization, so if something has changed on the server (folders added/deleted, messages added/deleted), the entire cache would have to be re-generate and saved again. The next step is to design a way to check for changes on the server and changes to the local cache and decide which changes take precedence. Should the local changes be applied first, and then pull the new state of affairs from the server? or should the server be more authoritarian and overwrite the changes made locally when in offline mode?

I implemented a few message management functions on the folder level that allow you to copy, move and delete a message. One problem i ran into though, if the cache is not updated after performing these operations, when i re-ran my test app, messages were loaded that no longer exist on the server and should also not exist in the cache.

Right now the SaveCache method forces every message to be downloaded from the server before everything is saved. But it should behave differently if there is already data from the cache loaded. It shouldnt need to re-download messages that are already stored. Part of the problem i see is that due to the dynamic data loading, most messages by default dont have the content loaded unless the message content has already been accessed elsewhere in the app before the cache is saved.

I will continue to research this and blog more about it as development continues

Bugs Fixed
I Received an email from a developer who was trying to use the SSL functionality to connect to Gmail and got an exception when the system tried to examine the ‘[Gmail]’ folder. The problem was this folder has the \Noselect flag specified which the system wasn’t told to look for and skip that folder if it was found. This has been fixed so the folder processing method will now skip folders that are flagged as not selectable (this applies to EXAMINE as well).

Once that bug was solved, another became readily apparent. After some frustrating debugging and searching i discovered what was causing the ReceiveBuffer method to hang when trying to receive the data from the message body using the SSL connection. I was trying to read from the SslStream object directly instead of the StreamReader object, which both have a Read() method, although slightly different. This has been corrected so you should not have any problems reading data from an SSL connection now.



1. icm - April 30, 2008

This is a great library!

I’m waiting for a “list of folders” features. Meanwhile, where can we download the latest code? I think that the http://www.codeplex.com/InterIMAP release is empty…

Thank you

2. atmospherian - April 30, 2008

The list of folders feature is already available in the library. You can download the current state of the library here:


The most recent changeset will be your best bet. The first official release is still a little ways off as there are still some features that need to be finished and/or implemented, and of course the all important documentation.

For now you can download the code as it is and test it out, and please let me know how it works for you and if you encounter any bugs while using it. I am pretty accessible and can work with you to overcome any difficulties and fix any bugs that you discover.

-Jason (Atmospherian)

3. Adam Tauno Williams - May 2, 2008

This is great. I’m very excited to see this bit of code maintained. AFAIK this is the only free IMAP library for .NET. Keep up the excellent work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: