i need to get the list of messages (inbox) from pop3 mail server then save them into a开发者_如何学运维 folder. i'm using .net framework 3.5.
Thank you in advance.
Some Googling turn up this:
Basically:
- The framework has no POP client class
- Make your own (or copy it from the link)
- Use it
You could use the TcpClient Class to connect and then you just send the correct commands as specified in the RFC: RFC 1939 - Post Office Protocol - Version 3
Specifically, look at the LIST
and RETR
commands.
You can find some tutorials/articles if you search on CodeProject.
However, if the messages have attachments or similar, it'll be a bit more complicated since you'll then also have to look into how to decode them, I'd suggest that you start with the wiki article in that case and then there's some tutorials for this as well on CodeProject.
精彩评论