C# Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

C# Examples

Bounced Mail
Bz2
Character Encoding
CSV
DKIM / DomainKey
Digital Certificates
Digital Signatures
Email
Email Object
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
MIME
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

Read POP3 Email Headers

Download: Chilkat .NET Assemblies

C# source code example to read email headers 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:
	// All POP3 communications are secure using SSL.
	//mailman.PopSsl = true;
	// Set the POP3 port to 995, the standard MS Exchange Server SSL POP3 port.
	//mailman.MailPort = 995;

	// Use GetAllHeaders to fetch each email header and the 1st N lines of
	// the body from a POP3 server. 
	// Note: Attachment information will not be available.  This is a shortfall
	// of the POP3 protocol because attachment information is not included
	// in POP3 headers. An entire POP3 email must be read in order to get complete
	// attachment information.
	Chilkat.EmailBundle bundle = mailman.GetAllHeaders(2);	// Get 2 body lines...
	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";
	}

Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 

© 2000-2013 Chilkat Software, Inc. All Rights Reserved.