Home | Contact Us | Download | Support | Purchase | Shopping Cart | Products


Product List
  "I spent weeks trying to piece together a comprehensive email validation component for an email list I run. Then I found aspNetMX and everything I needed was included! Within an hour I was validating addresses all the way to the user's individual account. 6,000 email addresses in less than 25 minutes. What a great product. "
Steven D. Queen, MCAD
 
More
Testimonials

Download a Message as Text

The following example downloads a POP3 message as text.

[C#]

            POP3 pop = new POP3( "127.0.0.1", "dave@blah.com", "mypassword");
           
            //if we have write permissions we can log the session
            pop.LogPath = "c:\\aspNetPOP3.log";
            pop.LogOverwrite = true;
           
            //if we don't have write permissions (as in an ASP.NET application, we can maintain the log in memory)
            pop.LogInMemory = true;
           
            //connect to the POP3 server
            pop.Connect();
           
            //get the number of messages and the size of the inbox
            pop.PopulateInboxStats();
           
            Console.WriteLine( "There are {0} messages waiting.", pop.InboxMessageCount );
            Console.WriteLine( "The total inbox size is {0} bytes.", pop.InboxSize );
           
            //get the first message
            string text = pop.GetMessageAsText( 1 );
           
            //show the message
            Console.WriteLine( text );
           
            //Close the POP3 Connection
            pop.Disconnect();
           
            //display the log
            Console.WriteLine( "Log----");
            Console.WriteLine( pop.Log );
 


 

[VB.NET]

             Dim pop As New POP3("127.0.0.1", "dave@blah.com", "mypassword")
            
             'if we have write permissions we can log the session
             pop.LogPath = "c:\aspNetPOP3.log"
             pop.LogOverwrite = True
            
             'if we don't have write permissions (as in an ASP.NET application, we can maintain the log in memory)
             pop.LogInMemory = True
            
             'connect to the POP3 server
             pop.Connect()
            
             'get the number of messages and the size of the inbox
             pop.PopulateInboxStats()
            
             Console.WriteLine("There are {0} messages waiting.", pop.InboxMessageCount)
             Console.WriteLine("The total inbox size is {0} bytes.", pop.InboxSize)
            
             'get the first message
             Dim emailText As String = pop.GetMessageAsText(1)
            
             'show the message
             Console.WriteLine(emailText)
            
              'Close the POP3 Connection
              pop.Disconnect()

 

 



The box is not shipped. aspNetPOP3 is a downloadable product.