This project is read-only.
This project uses the LumiSoft open-source project files as its base. I used Visual Studio 2010 and compiled all the code in .NET 4.0 including the source cited below. - works great, fairly easy. Compiles with .NET 4.0.

Here are the required links to their libraries and examples.
Downloads Main: (this is the root download folder)
Code Examples:


This demo project is a SIMPLE sample using LumiSoft.Net library that has very practical uses. You must download their library directly from their site. I am not including it because I don't maintain their code nor do I have any rights to the code. Go to the links above and download it directly. I set LumiSoft project properties in my VS2010 to build all of it in .NET 4.0 which it did with no errors. Their samples are fairly complex and maybe even overly tight coding when just an example. Although I expect that these examples are aimed at advanced level developers in general. Their project worked with minor tweaks.
The tweaks: Their IMAP Client Winform example is set in the project properties as "Release" which prevents VS from breaking on debug breakpoints. You must use the solution "Configuration Manager" to set the project to "Active(Debug)" for breakpoints to work. Their examples use anonymous methods for event handlers which is great tight coding... not real good as a teaching tool. My project uses "named" event method handlers so you can set breakpoints inside the handlers. However theirs is an excellent
way to handle inline code. They might have used the newer Lambda methods available since .NET 3.0 but did not and I didn't try to convert them.

From their samples I simplified the IMAP client to bare minimum.

This solution has three projects two of which will in all probability be "unavailable" because your
computer is not set up like mine. So here is how we fix that.

  1. First download the files as listed above if you have not done so.
  2. Unzip them to a convenient folder on your system.
  3. Remove the unavailable imapclientapp project
  4. Right-click Solution folder and add existing project then navigate to where you unziped the imapclientapp project and select it.
  5. Repeat the process for the Net project.
  6. Next open the Properties for each of the two projects added and select the Application tab. Set the target framework to .NET 4.0
  7. For debugging make sure that the Build tab setting is for Active(Debug).

At this point you should have three projects in your solution. You now must fix the references for the applications to build and run.
  1. In the GetEmailForm project references the LumiSoft.Net reference may be broken.
    1. Delete the existing reference
    2. Use "Add Reference" selecting Projects tab and the NET project.
  2. Repeat this process for the imapclientapp project.
If you have a problem adding the reference then proceed to next section where we build the Net project.

There is in the Net project (use Windows Explorer) where you unziped the files a "bin" folder. In it are the binaries already built by the LumiSoft authors. However, the libraries as they exist are in .NET 2.0 and we want .NET 4.0. Make a new folder under the bin for version2 and move all the bin files to there.
Now it is safe to build the solution. Build it now.

Make sure that the Net project builds without errors. You more than likely will get errors on the client projects due to reference issues. If you had problems adding the references above then you should try adding them again now that the Net project has completed its build. If you still can't reference the library, verify that the LumiSoft.Net.dll is infact in the /bin/debug folder in the Net project. If it is then you may manually add the reference by using the "Browse" to navigate to the folder where the file is located.

When all references are fixed the solution should build without errors.

Making it run:
If you are skipping down to here and haven't fixed the project for .NET 4.0 then go back and start at the top.
GetEmailForm and imapclientapp are both email clients that must connect to an IMAP capable email server.
IMAP support:
  • Hotmail - NO
  • Yahoo - proprietary = NO
  • Gmail - Yes, must be explicitly enabled but changes the way your normal gmail browser works.
  • GoDaddy - NO
  • ATT (Yahoo) - no
  • Verizon - cell phones only
  • RackSpace - Yes (not free and is included with other paid services.)

From research most server ISP systems allow IMAP connections. The large players cited above limit or disallow IMAP for business reasons (they offer free services usually and reserve the best for paying customers).

To connect you are going to need some connection information:
Example Gmail: see getstarted: you MUST enable IMAP which is NOT enabled by default.
server: SSL: Yes Port: 993
Username: your gmail address, your gamil password

Either input the information directly or cheat: create some const strings while you play with it.

How to test:
  1. Setup a test email account that accepts IMAP connections (gmail for instance)
  2. Create a folder named "junque" for messages to be moved to as part of the test.
  3. Edit Program.cs with you email account settings, build.

Send it some test messages:
If you include the word "viagra" in the subject that message will be deleted.
And if you include the word "ardvark in the subject that message will be moved to junque.
Finally if you include the word "form:" in the subject that message will be displayed.

In the Program.cs you may change the key words.

All other messages will be listed.
Run it.

Have fun!

Last edited Jan 12, 2011 at 3:24 AM by wph101larrya, version 3


No comments yet.