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
Message-ID Header FieldDownload: Chilkat .NET Assemblies C# example discussing special considerations for the Message-ID email header field. // The Message-ID email header field is treated somewhat specially by the // Chilkat email component. // Many SMTP servers will consider emails as duplicates if the Message-ID is identical, // even if the other parts (subject, body, etc.) are different. These SMTP servers // may silently drop duplicates. // The Chilkat mailman's SendEmail method automatically replaces the Message-ID header // field in the outgoing email with a unique value. This behavior can be turned off // by setting the MailMan.AutoGenMessageId property = false. // Your program may set a custom Message-ID by calling the Email.AddHeaderField method. private void custom_message_id() { // Create an instance of the mailman for the purpose of unlocking. Chilkat.MailMan mailman = new Chilkat.MailMan(); mailman.UnlockComponent("Anything for 30-day trial"); // Turn off the auto-generate message-id feature. mailman.AutoGenMessageId = false; // Create a new email object... Chilkat.Email email = new Chilkat.Email(); email.Subject = "This is a test"; email.Body = "This is the mail body"; email.AddTo("Chilkat Support", "support@chilkatsoft.com"); email.From = "Chilkat Sales <sales@chilkatsoft.com>"; // Set our own Message-ID // The AddHeaderField method will replace a header field if it already exists. email.AddHeaderField("Message-ID", "4387ty6wer7g8745e8rtg"); // Send the email. mailman.SmtpHost = "smtp.comcast.net"; 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.