Bjørnar Nielsen wrote:
>>The SMTP protocol doesn't allow longer lines in any case, so
>>your application could check for a correct length. Also it
>>important to wrap lines that are longer than 74 cups. Means
>>either a blank or tab in front of a continuation line.
>
>
> I still think there should be check on linelength before copying, it's ok to
> not send all data if breaking rfc but not take down the whole application.
The application should do the check, that was Arlo's point.
> Should also subject be split into continuation-lines if longer than 74 cups
> (cups=chars?)? Outlook does not seem to do this with the subject.
Outlook *does* indeed break long subject lines. Here's an example of a
message I just sent using Outlook 2000:
-----------
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: This is a very long subject line. This is a very long subject lin
e. This is a very long subject line. This is a very long subject line.
Th
is is a very long subject line. This is a very long subject line. This
is
a very long subject line. This is a very lo
Date: Tue, 25 Oct 2005 11:17:25 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
charset="iso-8859-1"
testing!
dZ.
-----------
>
> If I understand this correct. If I have a subject of 2000 chars, I can send
> this if I insert crlf and tab at every 74 char and don't break any rfc?
Correct.
> Anyway, TCustomSmtpClient.DataNext would fail even when using continuation
> lines every 74 char if the total length is longer than 1024.
Again, this is a limit imposed by the protocol itself, so the
application should guard against it.
That said, I agree that the component could avoid potential buffer
overflows if it included the check, just as long as it does not impact
performance and functionality adversely.
dZ.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be