Reputation: 9577
I was advised to use OpenPop lib to fetch my mail from hotmail. But I could'nt find any better way to check for new mail except disconnecting and reconnecting again. And there, I found a problem, Hotmail doesn't allow more than 1 pop3 login each 15 minutes. I want to know if it's possible to get the new mail without disconnecting and reconnecting to their pop3 server. Here is my code:
Timer checker = new Timer();
checker.Interval = 1000;
checker.Tick += new EventHandler(delegate
{
Pop3Client client = new Pop3Client();
client.Connect("pop3.live.com", 995, true);
client.Authenticate("[email protected]", "myPassword");
label1.Text = client.GetMessageCount().ToString();
client.Disconnect();
});
checker.Start();
Upvotes: 1
Views: 2879
Reputation: 8672
I do not think that servers are allowed to show new mails to you during a POP3 session. I base this upon that it can certainly not delete emails as it would destroy the message numbers.
What would for example happen if the server says you have 100 messages, and when you fetch the message with number 55, it is actually not there since it was deleted in the meantime. I think the same applies to adding new emails during the session. Also, only one client can be logged into a POP3 account at a time, since the account will then be in a locked state. In that locked state, I do not think servers are allowed to change anything during the session.
I do not recall any methods in the POP3 specification which allows you to ask the server if new messages have been delivered.
If Hotmail does indeed only allow one POP3 login per 15 minutes, then I think you are left with just that. I do not know if there are other protocols which could be used here. IMAP is not supported, so that is not an option.
This is not the answer you want - but it is what I can give you.
Upvotes: 2
Reputation: 82186
Doesn't hotmail use DeltaSync also, for the SOAP API ?
You can use oSpy to see what gets sent and received over SSL, and replicate that functionality.
Upvotes: 0