Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Adding TO, CC, and BCC Email Recipients

Download Chilkat Email ActiveX

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.