Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Re: Sending a SMTP message with UTF-8 subject

www.cryer.info
Managed Newsgroup Archive

Re: Sending a SMTP message with UTF-8 subject

Subject:Re: Sending a SMTP message with UTF-8 subject
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Tue, 27 Nov 2007 10:20:51

"Richard" <ritchie872@yahoo.com> wrote in message
news:474bdfac$1@newsgroups.borland.com...

> Yes. After many tests,  the only think that seems to work
> is NoEncode:= true.

Then please provide a concrete, compilable example that does not work
correctly.

> It would be wonderful if you could asign a string to the
> headers without it being encoded.

There is no way to do that in the current Indy codebase.  Encoding always
occurs regardless of the user-assigned content.

> I have tried to modify the headers directly like:
>
> Mess.Headers.Value['Subject']:=
> '=?utf-8?B?IdEncoder.EncodeString(UTF8Encode(SomeWideString))+'?=';
>
> but this does nothing good either.

That will not work. TIdMessage will simply overwrite that value with the
current one from the Subject property.

> I'll take a look to TidMessage's code to see if I can disable
> the autoencoding of the ´headers without affecting the rest

There is nothing in place to disable it.  It is hard-coded behavior.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive