I want to read Email开发者_如何转开发s through pop3. On my asp.net web page how to do let me know,
which control should I use for showing email?
Here are a couple of libraries allowing you to retrieve messages from a POP3 server:
- C#Mail
- OpenPop
- Pop3.Net
- CodeProject article
Dim pop3Client As Pop3Client
Dim i As Integer =1
pop3Client = New Pop3Client
pop3Client.Connect("pop.gmail.com", 995, True)
pop3Client.Authenticate("myname@gmail.com", "mypassword")
Dim inbox_count As Integer = pop3Client.GetMessageCount
Do While (inbox_count >= i)
Dim message As Message = pop3Client.GetMessage(i)
Dim messagePart As MessagePart = message.MessagePart.MessageParts(0)
messagePart.BodyEncoding.GetString(messagePart.Body)'give you message body
message.Headers.From.Address'give you from address
message.Headers.DateSent'date of mail send
message.Headers.Subject'subject of the mail
i= i + 1
Loop
精彩评论