Re: Missing characters from HTML email message

Giganews Newsgroups
Subject: Re: Missing characters from HTML email message
Posted by:  Mark Minnie (mminn…@minniebyte.com)
Date: Fri, 12 Nov 2004

Here is what I have found...

In Indy 9.0.17, the IdMessageClient.pas SendBody function has some code that
adds an extra period to the mail message text.

<snip>
    if AnsiSameText(ATextPart.ContentTransfer, 'quoted-printable') then
    begin
      for i := 0 to ATextPart.Body.Count - 1 do
      begin
        if Copy(ATextPart.Body[i], 1, 1) = '.' then    // If the first
character is a period then......
        begin
          ATextPart.Body[i] := '.' + ATextPart.Body[i];  // Add an extra
period to the message
        end;
        Data := TIdEncoderQuotedPrintable.EncodeString(ATextPart.Body[i] +
EOL);
        if TransferEncoding = iso2022jp then
          Write(Encode2022JP(Data))
        else
          Write(Data);
      end;
    end

    else begin
      WriteStrings(ATextPart.Body);
</snip>

But....the ATextPart.Body text message in this function is actually
manipulated to add soft line breaks ("=" signs) after the line gets too long
(> 71 characters).  This manipulation is done in the
TIdEncoderQuotedPrintable.Encode function to any message that is
quoted-printable.  When my message has a period that happens to fall in the
middle of this soft line break, the period gets dropped in the final
received email message.

I think that this "extra-period" logic should be added to the
TIdEncoderQuotedPrintable.Encode function as well.  Specifically in the
NewLine sub-function.

Any thoughts on this?  Is there any harm in adding this logic to
TIdEncoderQuotedPrintable.Encode (NewLine)?

--  Mark

Replies

None

In response to

Missing characters from HTML email message posted by Mark Minnie on Tue, 9 Nov 2004