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
Adding TO, CC, and BCC Email Recipients
This example demonstrates how to add one or more TO, CC, or BCC recipients to an email using the Chilkat email component. ' Adding email recipients (To, CC, Bcc) can be done in several ways. ' This example describes each. Private Sub AddEmailRecipients(email As ChilkatEmail2) ' TO recipients can be added by calling AddTo once for each recipient. ' If you want to replace the TO recipients, be sure to clear the ' existing recipient list first: email.ClearTo email.AddTo "Chilkat Support", "support@chilkatsoft.com" email.AddTo "Chilkat Sales", "sales@chilkatsoft.com" email.AddTo "Chilkat Admin", "admin@chilkatsoft.com" ' An alternative way: email.AddMultipleTo """Chilkat Support"" <support@chilkatsoft.com>, ""Chilkat Sales"" <sales@chilkatsoft.com>, ""Chilkat Admin"" <admin@chilkatsoft.com>" ' The friendly names are not necessarily required: email.AddMultipleTo "support@chilkatsoft.com, ""Chilkat Sales"" <sales@chilkatsoft.com>, admin@chilkatsoft.com" ' CC recipients are similar: email.ClearCC email.AddCC "Chilkat Support", "support@chilkatsoft.com" email.AddCC "Chilkat Sales", "sales@chilkatsoft.com" email.AddCC "Chilkat Admin", "admin@chilkatsoft.com" ' An alternative way: email.AddMultipleCC """Chilkat Support"" <support@chilkatsoft.com>, ""Chilkat Sales"" <sales@chilkatsoft.com>, ""Chilkat Admin"" <admin@chilkatsoft.com>" ' Same goes for BCC email.ClearBcc email.AddBcc "Chilkat Support", "support@chilkatsoft.com" email.AddBcc "Chilkat Sales", "sales@chilkatsoft.com" email.AddBcc "Chilkat Admin", "admin@chilkatsoft.com" ' An alternative way: email.AddMultipleBcc """Chilkat Support"" <support@chilkatsoft.com>, ""Chilkat Sales"" <sales@chilkatsoft.com>, ""Chilkat Admin"" <admin@chilkatsoft.com>" ' Important Note for BCC: The BCC email addresses are *NOT* present in the MIME source of the email when it is sent. ' Therefore, when you read an email from a POP3 mailbox or IMAP mailbox, the BCC addresses will not be found. ' Methods such as email.GetBcc and properties such as email.NumBcc exist for the purpose of ' helping applications that compose email for sending. End Sub
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.