Problem with French and Spanish Characters with TIdMessage

Giganews Newsgroups
Subject: Problem with French and Spanish Characters with TIdMessage
Posted by:  Louis Valmeras (valmlou…
Date: Mon, 6 Jun 2011

I am sending emails, through a gmail account, using TIdSMTP and TIdMessage components using SSL with Intraweb and RAD Studio XE (C++ builder).
The messages contain embedded pictures.
When the message is in english there is not problem. But with messages with French or Spanish characters, the message is delivered like below:

? Chers utilisateurs,
Nous avons le plaisir de vous informer d'importants changements ?
1 - Au niveau de la s?rite: toujours soucieux de proteger les informations de nos utilisateurs, nous avons rajouter une option de s?rite suppl?ntaire. Tout acces a votre compte ?, generera automatiquement un courriel qui vous sera envoye. Ainsi si vous n'etes pas l'auteur de cet acces, vous pourrez aussitot nous avisez pour que nous prenions les mesures necessaires. ?

Below are part of the html code and C++ Builder code:

? <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body,td,th {
    color: #00F;
h1 {
    font-size: 14px;
    color: #30F;
h1,h2,h3,h4,h5,h6 {
    font-family: "Times New Roman", Times, serif;

<table width="895" height="376" border="1">
    <td width="175"><img src="../AdminPicture.jpg" alt="AdminPicture" name="AdminPicture" width="172" height="166" align="left" id="AdminPicture" /></td> ?

C++ builder code

TIdAttachmentFile *Photo;
TIdText *TexteHTML, *TexteBrut;
AnsiString Directory = ExtractFilePath(Application->ExeName);

TIWText *TexteMessage = new TIWText(NULL);
TJPEGImage *MailPicture = new TJPEGImage();


TIdMessage->Subject = Subject;
TIdMessage->ContentType = "multipart/related";
TIdMessage->Recipients->EMailAddresses = MessageRecipient;

TexteBrut = new TIdText(AlertEmail->MessageParts, NULL);
TexteBrut->ContentType = "text/plain";
TexteBrut->Body->Text = " ";

TexteHTML = new TIdText(AlertEmail->MessageParts, TexteMessage->Lines);
TexteHTML->ContentType = "text/html";

MailPicture->SaveToFile(PictureName + ".jpg");

I though that it was related to the charset utf-8 in the html code. But even if I replace it with ISO-8859-1, the result is the same.
What can be the problem?