TIDSmtp and Content-type of multipart messages

There is a bug in Indy 8.0.22 (or ToDo item?) with items Content-Type
and Content-Transfer-Encoding of multi-part message.

1. In message with plain text only, Indy uses properties of TIdMessage
in the right way. I set the next properties of TIdMessage:

  with IdMesssage do
       ContentType:= 'text/plain; charset="windows-1250"';
       ContentTransferEncoding:= '8bit';

  The resulting message is coded Ok:

  > To: k...@purus.cz
  > Content-Type: text/plain; charset="windows-1250";
  > Content-Transfer-Encoding: 8bit
  > Date: Fri, 11 May 2001 09:07:10 +0200
  > X-Priority: 1
  > X-Library: Indy 8.0.22
  > X-Mailer: SMS send
  >11.05.01, 09:07: Program E-Mailovy server nen spu1tny

2. But, if there are any attachments and multi-part message is made,
Indy ignores these properties and sets Content-Type and
Content-Transfer-Encoding of the text part of message as

  > --=_NextPart_2rfkindysadvnqw3nerasdf
  > Content-Type: text/plain
  > Content-Transfer-Encoding: 7bit
  >11.05.01, 09:07: Program E-Mailovy server nen spu1tny

In my opinion, there is a simple way, used already in WinShoes: to use
ContentType and ContextTransferEncoding of the original message in the
message part of the multi-part message.
(From WinShoes, procedure TWinshoeMessageClient.Send):

    WriteLn('Content-Type: ' + pMsg.ContentType);

Karel Kral, informatik
Purus, s.r.o., Cezavy 627, 664 56 Blucina, CZ
Tel: 05/47235000, 0602/552432, Fax: 05/47231203
E-Mail: mailto:k...@purus.cz, WWW: http://www.purus.cz