Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Download Email from a POP3 ServerC# source code to download email from a POP3 server. textBox1.Text = ""; // Create a mailman object for reading email. Chilkat.MailMan mailman = new Chilkat.MailMan(); // Any string argument automatically begins the 30-day trial. mailman.UnlockComponent("30-day trial"); // Set our POP3 hostname, login and password mailman.MailHost = "mail.chilkatsoft.com"; mailman.PopUsername = "login"; mailman.PopPassword = "password"; // Connecting via SSL is possible by adding these lines: //mailman.PopSsl = true; // Set the POP3 port to 995, the standard MS Exchange Server SSL POP3 port. //mailman.MailPort = 995; // Download email from the POP3 server by calling TransferMail Chilkat.EmailBundle bundle; bundle = mailman.TransferMail(); if (bundle == null) { MessageBox.Show(mailman.LastErrorText); return; } int i; int n = bundle.MessageCount; for (i=0; i<n; i++) { Chilkat.Email email = bundle.GetEmail(i); textBox1.Text = textBox1.Text + email.From + "\r\n"; textBox1.Text = textBox1.Text + email.Subject + "\r\n"; textBox1.Text = textBox1.Text + email.Body + "\r\n****\r\n"; } Important: The download for this
example does not contain the ChilkatDotNet.dll which |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.