TIdMessage.Headers lost with NoEncode

Giganews Newsgroups
Subject: TIdMessage.Headers lost with NoEncode
Posted by:  Boba (Bo…@somewhere.world)
Date: Fri, 4 Sep 2015

Dear Reader; what is wrong with the following code?:
{code:cpp}
  IdMsg->Clear();
  IdMsg->NoEncode = true;
  IdMsg->ContentType = "text/plain; CharSet=UTF-8";
  //IdMsg->CharSet = "UTF-8";
  IdMsg->ContentTransferEncoding = "quoted-printable";
  //IdMsg->GenerateHeader();
  IdMsg->Body->Add("Jimmy, gimmy =E2=82=AC10 or $15.");
  IdMsg->SaveToFile("msg.txt", true);
{/code}
above, IdMsg is the name of TIdMessage component on
my Form1.  The "msg.txt" file does not contain any
headers. Please advise. Thanks.            Boba TC.

Replies