Author: atsushi
Date: 2007-10-16 03:06:34 -0400 (Tue, 16 Oct 2007)
New Revision: 87558
Modified:
trunk/mcs/class/System/System.Net.Mail/ChangeLog
trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs
Log:
2007-10-16 Atsushi Enomoto <[EMAIL PROTECTED]>
* SmtpClient.cs : Replace every \r and \n with \r\n per RFC 2821
section 2.3.7, or you will receive SMTP error 451.
Modified: trunk/mcs/class/System/System.Net.Mail/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net.Mail/ChangeLog 2007-10-16 06:59:36 UTC
(rev 87557)
+++ trunk/mcs/class/System/System.Net.Mail/ChangeLog 2007-10-16 07:06:34 UTC
(rev 87558)
@@ -1,5 +1,10 @@
2007-10-16 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * SmtpClient.cs : Replace every \r and \n with \r\n per RFC 2821
+ section 2.3.7, or you will receive SMTP error 451.
+
+2007-10-16 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* AlternateViewCollection.cs, LinkedResourceCollection.cs,
AttachmentCollection.cs : added missing 2.0 members.
Modified: trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs
===================================================================
--- trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs 2007-10-16
06:59:36 UTC (rev 87557)
+++ trunk/mcs/class/System/System.Net.Mail/SmtpClient.cs 2007-10-16
07:06:34 UTC (rev 87558)
@@ -484,8 +484,10 @@
private void SendData (string 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 (data.Replace ("\r\n", "\n")
+ .Replace ('\r', '\n')
+ .Replace ("\n", "\r\n"));
writer.Write ("\r\n");
writer.Flush ();
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches