Question

I am sending e-mails using the indy components TidSMTP and TidMessage.

The mails I recieve are without accents.

If I do for example:

MyTIdMessage.Body.Text := 'Tèst';

As i recieve the e-mail I see "Test" instead of "Tèst"

Is there a way to tell TIdMessage not to ignore accents or is this bug?

Note: I am using Indy 10.5.8.0

Was it helpful?

Solution

Be sure to set the correct Enconding, ContentTransferEncoding and CharSet. Being one of the oldest protocol, mail is designed to be used by computers using only 7 bits, and non US-ASCII characters thereby needs to be encoded. There are some different ways (quoted-printable, ecc.)

Also check the OnInitializeISO event.

OTHER TIPS

Make sure you set the correct CharSet by doing this

MyIdMessage.CharSet := 'US-ASCII';

the string values are listed in IdCharsetNames array.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top