Author: gnorton
Date: 2007-02-16 13:46:02 -0500 (Fri, 16 Feb 2007)
New Revision: 73039

Modified:
   trunk/mcs/class/System/System.Net.Mail/ChangeLog
   trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs
Log:
2007-02-16  Geoff Norton  <[EMAIL PROTECTED]>

        * SmtpClient.cs: Dont send bare LF.  Send <CR><LF> regardless
        of platform.  (ref: http://cr.yp.to/docs/smtplf.html)



Modified: trunk/mcs/class/System/System.Net.Mail/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net.Mail/ChangeLog    2007-02-16 18:36:06 UTC 
(rev 73038)
+++ trunk/mcs/class/System/System.Net.Mail/ChangeLog    2007-02-16 18:46:02 UTC 
(rev 73039)
@@ -1,3 +1,8 @@
+2007-02-16  Geoff Norton  <[EMAIL PROTECTED]>
+
+       * SmtpClient.cs: Dont send bare LF.  Send <CR><LF> regardless
+       of platform.  (ref: http://cr.yp.to/docs/smtplf.html)
+
 2007-01-20  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * MailMessage.cs: Add suport to the MailMessage constructor to

Modified: trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs        2007-02-16 
18:36:06 UTC (rev 73038)
+++ trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs        2007-02-16 
18:46:02 UTC (rev 73039)
@@ -400,7 +400,9 @@
 
                private void SendData (string data)
                {
-                       writer.WriteLine (data);
+                       writer.Write (data);
+                       // Certain SMTP servers will reject mail sent with unix 
line-endings; see http://cr.yp.to/docs/smtplf.html
+                       writer.Write ("\r\n");
                        writer.Flush ();
                }
 
@@ -555,7 +557,9 @@
 
                private SmtpResponse SendCommand (string command)
                {
-                       writer.WriteLine (command);
+                       writer.Write (command);
+                       // Certain SMTP servers will reject mail sent with unix 
line-endings; see http://cr.yp.to/docs/smtplf.html
+                       writer.Write ("\r\n");
                        writer.Flush ();
                        return Read ();
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to