Page 1 of 1

TScSMTPClient - Problem with Umlaute in Emails

Posted: Wed 17 Nov 2021 14:27
by bij
I am using Devart SecureBridge V10.0.1 with Delphi 10.4.2.

This test...

...
ScMailMsg.Subject := 'Umlauttest ÄÖÜäöüß';
ScMailMsg.Body.Text := 'Umlauttest ÄÖÜäöüß';
ScMailMsg.From.Address := 'from@email';
ScMailMsg.From.DisplayName := 'Umlauttest ÄÖÜäöüß';
ScMailAddressItem := TScMailAddressItem.Create(ScMailMsg.ToAddress);
ScMailAddressItem.Address := 'to@email';
ScMailAddressItem.DisplayName := 'Umlauttest ÄÖÜäöüß';
...

results in getting an email with...

subject being: Umlauttest AOUaou?
from address being: Umlauttest AOUaou? <from@email>
to address being: Umlauttest AOUaou? <to@email>
body text being: Umlauttest DV\dv|_

Please help!

bij

Re: TScSMTPClient - Problem with Umlaute in Emails

Posted: Thu 25 Nov 2021 15:02
by YanishevskiyVI
Hi there,

Please be informed, that in order to use umlauts, the appropriate encoding should be applied:

Code: Select all

TScMailMessage.SubjectCharset:='iso-8859-1';//affect to a Subject
TScMailMessage.ContentCharset:='iso-8859-1';//affect to a whole message content
TScMailMessage.HeadersCharset:='iso-8859-1';//affect to message headers, including mail addresses

Re: TScSMTPClient - Problem with Umlaute in Emails

Posted: Fri 26 Nov 2021 08:04
by bij
@YanishevskiyVI:
Thanks a million. This did the trick.

Re: TScSMTPClient - Problem with Umlaute in Emails

Posted: Mon 29 Nov 2021 08:11
by YanishevskiyVI
Glad to hear that your issue is resolved.
Feel free to contact us anytime in case you get any other questions.

Regards,
Vitaliy