I am experimenting with an asp.net application wherein I do the following things (simplified for the purpose of this discussion):
1. Take user's gmail username/password (don't fret, I am not doing any nasty stuff ).
2. Create TcpClient object and connect it to the Gmail's POP email server using the provided username/password.
3. I am going to use this TcpClient object to download mails for the user.
Following is the problem I face:
1. Say I have presented the user with the subject lines of all his emails.
2. Now he clicks one subject line to download the message. (This will create the post-back to the aspx page)
3. When I receive the post back, will I be able to re-use the same TcpClient object which I connected to the POP server, if I store that object as a Session variable?
I doubt the streams associated with the object will not remain valid.
Is this even the right method to achieve what I am trying to achieve?
View Complete Post