문제

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

도움이 되었습니까?

해결책

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.

다른 팁

Make sure you set the correct CharSet by doing this

MyIdMessage.CharSet := 'US-ASCII';

the string values are listed in IdCharsetNames array.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top