Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

November 16, 2007

SMTP and POP3 Email Events

A summary of the Chilkat.MailMan events for POP3 and SMTP in C#:

	
        private void button1_Click(object sender, EventArgs e)
        {
            Chilkat.MailMan mailman = new Chilkat.MailMan();
	
            mailman.EnableEvents = true;
	
            mailman.OnAbortCheck += new Chilkat.MailMan.AbortCheckEventHandler(mailman_OnAbortCheck);
            mailman.OnEmailReceived += new Chilkat.MailMan.EmailReceivedEventHandler(mailman_OnEmailReceived);
            mailman.OnPercentDone += new Chilkat.MailMan.PercentDoneEventHandler(mailman_OnPercentDone);
	
            // The HeartbeatMs property controls the frequence of AbortCheck callbacks.
            mailman.HeartbeatMs = 100;   // Call AbortCheck every .1 seconds
        }
	

	
        void mailman_OnPercentDone(object sender, Chilkat.MailPercentDoneEventArgs args)
        {
            // Called during any POP3 read/SMTP send whenever the percentage progress updates.
            // args.PercentDone contains an integer value from 1 to 100
            // args.Abort is a bool that if set to true, causes the read to abort.
        }
	
        void mailman_OnEmailReceived(object sender, Chilkat.EmailEventArgs args)
        {
            // Called during any POP3 email or header download.
            // args contains the following string members:
            // args.Date contains the contents of the email's Date header field.
            // args.FromAddr contains the From header field's address part.
            // args.FromName contains the From header field's friendly-name part.
            // args.ReturnPath contains the Return-Path header field.
            // args.Subject contains the Subject header field.
            // args.Uidl contains the UIDL of the email (uniquely identifies it on the POP3 server).
            // There is one integer member:
            // args.Size contains the total size, in bytes, of the email (including attachments).
        }
	
        void mailman_OnAbortCheck(object sender, Chilkat.AbortCheckEventArgs args)
        {
            // Called periodically during any SMTP or POP3 method call.
            // The HeartbeatMs controls the frequence of calls (in milliseconds).
            // args.Abort may be set to true to abort the current method call.
        }


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.