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

Product List
  "MY BEST SHOPPING EXPERIENCE ON THE INTERNET. ListNanny did not support our mailing program, but dave suggested we send him some file samples and three days later we got a new version supporting our mailing program. Dave let us use the program, and only after he was satisfied that we have a working solution we paid for the standard product $129 - nothing for the special development. I wish all software vendors were so supporting of their customers."
D. Geisler
Broadway Box

Saving Attachments

The following example demonstrates saving all of the attachments of an email to a directory.


using System;
using aspNetPOP3;
using aspNetMime;
namespace cstest
	class Class1
		static void Main(string[] args)
			//create a new pop3 object
			POP3 pop = new POP3("","dave@blah.com", "mypassword" );
			//connect to the POP3 server
			MimeMessage msg = pop.GetMessage(1 );
			//save attachments to a directory
			msg.SaveAttachments( "c:\\temp\\mydirectory\\", true );

			Console.WriteLine( "done.");
			Console.ReadLine( );



Imports aspNetPOP3
Imports aspNetMime

Module Module1

    Sub Main()

        'create a new pop3 object
        Dim pop As New POP3("", "dave@blah.com", "mypassword")

        'connect to the POP3 server

        Dim msg As MimeMessage = pop.GetMessage(1)

        'save attachments to a directory
        msg.SaveAttachments("c:\temp\mydirectory\", True)



    End Sub

End Module




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