Menu

period at start of line omitted

Help
2003-12-05
2003-12-30
  • Mike Bridge

    Mike Bridge - 2003-12-05

    Hi-

    I'm having a problem with periods at the beginning of lines in the HTML body and the Text body.  They seem to disappear; I've posted a demo in the bug area.  Does anyone else have this problem?

    This is with version 01-09-06.

    Thanks,

    -Mike

     
    • Mike Bridge

      Mike Bridge - 2003-12-16

      Here's a patch to Smtp.cs---it's to get it compliant with the RFC 821 double-period specification.

      On around line 275, replace:

                 WriteToStream(ref nwstream, msg.ToString() + "\r\n.\r\n");

      with:

                 String[] lines = msg.ToString().Split(new char[] {'\n'});
                 for (int i=0; i<lines.Length; i++)
                 {
              if (lines[i].Length>0 && lines[i][0]=='.')
                      {
                          WriteToStream(ref nwstream, "." + lines[i] + "\n");
                      }
                      else
                      {
                           WriteToStream(ref nwstream, lines[i] + "\n");
                      }
                  }

                  WriteToStream(ref nwstream, "\r\n.\r\n");

       
    • Ian Stallings

      Ian Stallings - 2003-12-30

      I might have to issue a small patch for this one. Sorry if it didn't make it into 1.09.7

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.