June 26th, 2002, 09:31 AM
polling/poping email accounts with c#
We're currently writing a huge app for my company that will control everything that the users can do while they're in the office but I'm got stuck on one thing - email!!!
Its no problem to create and send emails and attachments using c# but does anyone know how you poll or pop a mail server to pick up mail?
June 27th, 2002, 07:26 AM
If you were using Java you could just use JavaMail
The Long Way Round
For anyone thats interested, the only way to do this seems to be using TCPClient, connecting to port 110 and manually sending and receiving commands, arguments and server responses as byte arrays!!
I've currently got as far as connecting to any POP server I specify, sending suitable commands and arguements and receiving server responses. I've got all the commands w3orking (except one) and am processing the responses. The only things I haven't done yet is get APOP working (user authentication without sending passwords as clear text), and to process the huge variety of headers and mime encoded bodies.
Once I've got those bits sorted I might post the code somewhere if anyones interested in having it!