Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
POP3 Connection and Read TimeoutsDownload: Chilkat .NET Assemblies C# program showing how to set connection and read timeouts when reading 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"; // Set TCP/IP socket connection and read timeouts in number of seconds. mailman.ConnectTimeout = 5; mailman.ReadTimeout = 5; // Copy email from the POP3 server, leaving it on the server. Chilkat.EmailBundle bundle; bundle = mailman.CopyMail(); 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 |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.