Re: periods in TIdMessage

Giganews Newsgroups
Subject: Re: periods in TIdMessage
Posted by:  Remy Lebeau (Indy Team) (
Date: Thu, 12 Oct 2006

"Igor" <ig…> wrote in message

> For Indy9 ( I think for Ind10 as well)

This only effects Indy 9.  Indy handles the periods properly.

> TIdMessageClient.SendMsg does not respect single periods
> as the only content in line inside message text.

Only when TIdMessage.NoEncode is True.

> rfc821 says that sender is supposed to prepend dot if there is
> line that starts from single dot.

SendMsg() does do exactly that.  If it did not, then Indy would have been
broken for many meny years now, which is not the case here.

When the TIdMessage.NoEncode property is True, indicating that Indy should
not encode the message text in any way, then SendMsg() calls the
connection's WriteStrings() method for both the Headers and the Body.  It
should be using WriteRFCStrings() for the Body (and WriteRFCStrings()
updated to not always send the terminating '.' unnecessarily).  That much is
a bug.

When the TIdMessage.NoEncode property is False, indicating that Indy should
encode the message text, then SendMsg() calls SendBody(), which does prepend
an extra period to each line that begins with a period.




In response to

periods in TIdMessage posted by Igor on Thu, 12 Oct 2006