IdMessage subject Encoding

Giganews Newsgroups
Subject: IdMessage subject Encoding
Posted by:  Alexander Fatykhov (hightow…@mail333.com)
Date: Tue, 16 Sep 2003

Hello, All!

Is it possible to change message subject encoding?
e.g. I've multipart message (1 text part and several attachments), I set

  IdMessage->ContentTransferEncoding = "8bit";
  IdMessage->ContentType = "Windows-1251";
  IdMessage->CharSet = "text/plain";
  IdMessage->Subject = @Subject in russian

  TIdAttachment *a = new TIdAttachment(IdMessage->MessageParts, "file
name");
  TIdText *idText = new TIdText(IdMessage->MessageParts, slBody);

and after sending I have in headers: (why ISO-8859-1 and how to change
it???)

From: =?ISO-8859-1?Q?=C0=EB=E5=EA=F1=E0=ED=E4=F0?= <my@mail>
Subject: =?ISO-8859-1?Q?=F2=E5=F1=F2?=
To: =?ISO-8859-1?Q?=C0=EB=E5=EA=F1?= <my@mail>
Content-Type: multipart/mixed;
boundary="=_NextPart_2rfkindysadvnqw3nerasdf";
charset="Windows-1251"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

This is a multi-part message in MIME format

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: text/plain;
        charset="Windows-1251"
Content-Transfer-Encoding: 8bit

ORIGINAL MESSAGE TEXT - OK

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: application/octet-stream;
        name="xxx0.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="image.jpg"

/9j/4AAQSkZ ...... ... .. .. .. .. .. . . . .

--=_NextPart_2rfkindysadvnqw3nerasdf--

Replies