Visual C++ Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Visual C++ Examples

CkString
Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT / HTML Email
RSA
S/MIME
Socket
Spider
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Unreleased...
FileAccess
Bzip2
LZW
Icon

 

 

 

 

 

 

 

 

Send Email using iso-8859-1 Encoding

Sample C++ program to showing how to send email using the iso-8859-1 charset. This example uses characters with diacritics (accented characters) to show how Chilkat Email VC++ automatically handles encoding the email.

    CkMailMan mailman;

    // Any string passed to UnlockComponent begins the 30-day trial.
    bool unlocked = mailman.UnlockComponent("30-day trial");
    if (!unlocked)
	{
	printf("Failed to unlock component\n");
	return;
	}

    mailman.put_SmtpHost("mail.earthlink.net");
    
    // Send an email using the iso-8859-1 charset encoding.
    CkEmail email;

    email.put_Body("This is the email body Û Ü Ý Þ ß à á â");

    email.put_Subject("Û Ü Ý Þ ß à á â");

    email.AddTo("Chilkat Þ ß Support","support@chilkatsoft.com");

    email.put_FromName("ç è é ê ë");
    email.put_FromAddress("matt@chilkatsoft.com");

    email.put_Charset("iso-8859-1");

    // Send the email
    if (!mailman.SendEmail(&email))
	{
	mailman.SaveLastError("errors.xml");
	}

*************
This is the MIME text of the email that is created and sent by this example:

MIME-Version: 1.0
Date: Fri, 20 Aug 2004 07:43:45 -0500
Message-ID: <CHILKAT-MID-57097603-93de-48e9-8824-7b0d1bfb191c@DotNetDev>
X-Mailer: Chilkat Software Inc (http://www.chilkatsoft.com)
X-Priority: 3 (Normal)
Content-Transfer-Encoding: quoted-printable
subject: =?iso-8859-1?Q?=DB_=DC_=DD_=DE_=DF_=E0_=E1_=E2?=
To: =?iso-8859-1?Q?Chilkat_=DE_=DF_Support?= <support@chilkatsoft.com>
From: =?iso-8859-1?Q?=E7_=E8_=E9_=EA_=EB?= <matt@chilkatsoft.com>
return-path: matt@chilkatsoft.com
Content-Type: text/plain;
	 charset="iso-8859-1"

This is the email body =DB =DC =DD =DE =DF =E0 =E1 =E2

 

 

 

Need a specific example? Send a request to support@chilkatsoft.com

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

Mail Component · .NET Mail Component · XML Parser