Re: Missing period character

Giganews Newsgroups
Subject: Re: Missing period character
Posted by:  Ivan (iv…@email.com)
Date: Fri, 21 Apr 2006

Btw. I found in one older message this:

> Re: HTML Comment
>
> There are certain, albeit uncommmon, conditions that can cause Indy's message encoders to
> incorrectly
> send encoded data without protecting the leading period character on individual lines.
> The problem would occur on ANY line that begins with a period:
>
>    for I := 0 to Body.Count-1 do
>    begin
>        if Body[i].SubString(1, 1) = '.' then
>            Body[i] := '.' + Body[i];
>    end;

so call it this way just before sending mail:

      if IdMessatge.MessageParts[MsgNum] is TIdText then
        with TIdText(IdMessage.MessageParts[MsgNum]) do
          for LineNum := 0 to Pred(Body.Count) do
            if Copy(Body[LineNum], 1, 1) = '.' then
              Body[LineNum] := '.' + Body[LineNum];

however it can't work because the Body[LineNum] contains the original data,
i.e. not broken to several rows yet. So what should I do ?

Ivan

Replies

In response to

Missing period character posted by Ivan on Fri, 21 Apr 2006