C# Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP 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

 

 

 

 

 

 

Send MDN Notifications to an Automated Mail Bounce Processor

Download: Chilkat .NET Assemblies

How to specify an MDN email address (bounce handling email address) when sending email in C#.

        // A common need is to send email such that message delivery notifications (MDN)
        // are sent to a separate email address to allow an automated system to process bounced email.
        // To achieve this with the Chilkat .NET email component, simply set the 
        // mailman.BounceAddress property equal to the email address where you want
        // MDN's delivered.
        private void button7_Click(object sender, EventArgs e)
        {
            Chilkat.MailMan mailman = new Chilkat.MailMan();
            mailman.UnlockComponent("anything for 30-day trial");

            mailman.SmtpHost = "smtp.comcast.net";

            // If your SMTP server requires authentication, set your login/password:
            mailman.SmtpUsername = "***";
            mailman.SmtpPassword = "***";

            Chilkat.Email email = new Chilkat.Email();
            email.From = "Matt <matt@chilkatsoft.com>";
            email.Subject = "Subject for C# MDN/Bounce address mail programming sample";
            email.Body = "Body for C# MDN/Bounce address example code";
            email.AddTo("Email Component Support", "support@chilkatsoft.com");

            // Set the bounce address for MDN notifications
            email.BounceAddress = "bounce-processor@chilkatsoft.com";

            bool success = mailman.SendEmail(email);
            if (!success)
            {
                MessageBox.Show(mailman.LastErrorText);
            }
            else
            {
                MessageBox.Show("Mail Sent!");
            }

        }


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-2012 Chilkat Software, Inc. All Rights Reserved.

Email Component · XML Parser