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
Custom Email Header Fields
How to add custom header fields to an email. ' The ChilkatEmail2.AddHeaderField can be used to add custom header fields ' to an email, or to replace existing header fields. If a header field with ' the same name already exists, AddHeaderField will replace it. Private Sub AddCustomHeaderFields(email As ChilkatEmail2) ' I cannot recommend header field naming conventions, especially with ' respect to anti-SPAM and/or anti-Virus email blocking/filtering. ' I would recommend using the "view source" features of your email client ' to view the header fields of emails you receive. You'll get a sense of ' which fields are custom and which are not. ' In this example, I'll prefix the custom fields with "X-". email.AddHeaderField "X-Company", "Chilkat Software" email.AddHeaderField "X-Regarding", "Example Code" ' There is a special email header field prefix ' that can be used with Chilkat email: "CKX-" ' Any header field beginning with the prefix "CKX-" is automatically ' removed from the email during the sending process. (Except when ' sending MIME via SendMime.) ' This allows you to embed meta-data with your email and save the MIME ' to a file or to your database. For example: email.AddHeaderField "CKX-Customer-ID", "1234" email.SaveEml "customer.eml" End Sub
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.