C# Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

C# Examples

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


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

Multiple TO, CC, and BCC Email Recipients

Download: Chilkat .NET Assemblies

This C# sample code describes the alternative ways of adding TO, CC, and BCC recipients to an email object.

// Adding email recipients (To, CC, Bcc) can be done in several ways.
// This example describes each.
private void AddEmailRecipients(Chilkat.Email email)
{
    // 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.

}

Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 

© 2000-2013 Chilkat Software, Inc. All Rights Reserved.