This project is read-only.

Web Forms Implementation

Topics: Help requests
Jun 20, 2014 at 3:05 PM
Edited Jun 20, 2014 at 3:06 PM
Hello, I have a web application and I would like to make a simple IMAP-Google mail client.

My problem is time, when I connect on the Page_Load of inbox.aspx it takes a lot of time to login and retrieve all folders and inbox messages (which is acceptable for the first time) and save client to Session, when I click an email to view it, in the Page_Load of viewemail.aspx, I load client from Session and even if it is connected when I try to retrieve a message or another folder it is client.Folders = null.

This is very time consuming to disconnect and connect-login again. Is there anything wrong? Can I do something better?
Jun 22, 2014 at 12:17 AM
Hi gtzoumis,

the behavior you describe is really strange, because once you have requested the folders on login, they should not be set to null after you saved the client to session.

I have created a sample web application (ASP.Net MVC 4), take a look at it downloading the latest source code. It shows some basic approach on how a web client can be implemented. (not perfect yet, took a few hours to implement).


Marked as answer by gtzoumis on 6/23/2014 at 1:00 AM
Jun 23, 2014 at 9:00 AM
Edited Jun 23, 2014 at 9:29 AM
Thanx for your reply Pavel,

I saw that your solution involves static variable in Session, which when I used it in other projects I had issues like mixed sessions and data connected with false sessions. I will search for similar issues and I will tell you.


Jun 25, 2014 at 10:46 PM
Hi gtzoumis,

Google has released a new GMail API recently. Might be interesting for your project. Take a look here:


Jun 30, 2014 at 7:22 AM
Thanx for your help, I'll check it.