Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Send MDN Notifications to an Automated Mail Bounce ProcessorDownload: 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 |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.