> This fix is for both V6 OverbyteIcsSmtpProt.pas as well as for v5 > SmtpProt.pas
I have applyed the fixe to my source code. > You should turn on property FoldHeaders in order to keep the line length > within the range of maximum suggested length, that is only 75 characters. Shouldn't we turn this option to true by default ? I don't see any risk to break existing code. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Arno Garrels" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Friday, November 10, 2006 11:18 PM Subject: Re: [twsocket] SMTP Control: Email header appears in body of email > There's indeed a maximum line length specified in the SMTP protocol. > > Quoted from RFC 821 Page 42: > " The maximum total length of a text line including the > <CRLF> is 1000 characters (but not counting the leading > dot duplicated for transparency)." > > But looking at the code I found also that if a line exeeds 1023 characters > an exeption is raised, bad! > > This fix is for both V6 OverbyteIcsSmtpProt.pas as well as for v5 > SmtpProt.pas > > procedure TCustomSmtpClient.DataNext; > var > MsgLine : array [0..1023] of char; > begin > [..] > Inc(FItemCount); > if FItemCount < FHdrLines.Count then begin > { There are still header lines to send } > <= // StrPCopy(@MsgLine, FHdrLines.Strings[FItemCount]); {AG > 11/10/06} > => StrLCopy(@MsgLine, PChar(FHdrLines.Strings[FItemCount]), > SizeOf(MsgLine) - 1); {AG 11/10/06} > [..] > > > You should turn on property FoldHeaders in order to keep the line length > within the range of maximum suggested length, that is only 75 characters. > > --- > Arno Garrels [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > > > > Jody Bowman wrote: >> Greetings, >> >> I'm an engineer from the Milwaukee, Wisconsin (USA) >> area and was looking at using the ICS SMTP control for an email >> application I'm working on. It looks to satisfy the project >> requirements except for one oddity. If I include more than 1018 >> characters worth of email addresses in the To: line (which can happen >> in my app), the letter is sent successfully to all recipients but the >> email header information appears in the body of the email. I checked >> the SMTP protocol (http://www.ietf.org/rfc/rfc0821.txt) and I'm well >> within the limit of 100 recipients. If there is an item that says >> doing this is invalid I haven't been able to find it. >> Would you know if this is a limitation of SMTP, or something I >> might be implementing wrong, or a limitation of the control? >> An example of what one of these letters looks like is included at >> the bottom of this message. I repeatedly used my own address for the >> example. >> Thanks in advance for any help, >> >> Jody Bowman >> Finishing Controls System Engineering >> >> QuadTech >> A Subsidiary of Quad/Graphics >> >> Sussex, Wisconsin USA >> +1 414 566 7721 tel >> +1 414 566 4010/7721 pager/PIN >> [EMAIL PROTECTED] >> www.quadtechworld.com >> >> >> To: >> >> [EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL >> PROTECTED];[EMAIL PROTECTED] >> om;[EMAIL PROTECTED] >> Subject: Testing >> Sender: [EMAIL PROTECTED] >> Mime-Version: 1.0 >> Content-Type: text/plain; charset="iso-8859-1" >> Date: Thu, 9 Nov 2006 15:31:07 -0600 >> Message-ID: <[EMAIL PROTECTED]> >> X-Mailer: ICS SMTP Component V2.50 >> Return-Path: [EMAIL PROTECTED] >> X-OriginalArrivalTime: 09 Nov 2006 21:31:07.0118 (UTC) >> FILETIME=[5DCB60E0:01C70446] >> X-TM-AS-Product-Ver: SMEX-7.0.0.1499-3.6.1039-14804.000 >> X-TM-AS-Result: No-1.298500-0.000000-31 >> >> This is the first line >> Then the second one >> The next one is empty >> >> The next one has only a single dot >> . >> Finally the last one >> >> >> >> >> --------------------------------- >> Access over 1 million songs - Yahoo! Music Unlimited. > -- > 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 -- 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