CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

FreePop3 - Connect and Pop All Messages

I wanted to show some sample code for receiving messages with FreePop3:

// Create the client
Pop3Client freePopClient = new Pop3Client("popserver.yourcompany.com", "user", "pass");

// Pop off all of the messages, this will also connect and disconnect
// the TCP session
Pop3Client.Pop3MessageCollection messages = pop3.PopMessages();
foreach(Pop3Client.Pop3Message message in messages)
{
     
// Do something cool here
}

Could it be any simpler?

-Brendan



Comments

Josh Pollard said:

# October 28, 2004 1:23 PM

Pashik said:

possibly there is error in code.

what is pop3?

Pop3Client.Pop3MessageCollection messages = pop3.PopMessages();

# June 4, 2007 9:02 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Brendan Tompkins

Brendan has been programming with .NET since the first public beta and is owner and operator of Port Technology Services, a consultancy company providing .NET application development services to the Maritime industry. In July, 2007, he was awarded the Microsoft MVP award for ASP.NET. He's also a proud co-founder of failed .COM startup Intrinsigo, and has had a hand in the failure of numerous other businesses. He currently runs CodeBetter.Com and Devlicio.us, and lives in Norfolk, Virgina with his wife Tiara and son Ian.

View Brendan's profile on LinkedIn

Check out Devlicio.us!

Our Sponsors