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?
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?