[Mono-bugs] [Bug 82035][Nor] New - SmtpClient always tries to authenticate

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jul 7 15:08:31 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by kasper22 at tampabay.rr.com.

http://bugzilla.ximian.com/show_bug.cgi?id=82035

--- shadow/82035	2007-07-07 15:08:31.000000000 -0400
+++ shadow/82035.tmp.7250	2007-07-07 15:08:31.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 82035
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: Ubuntu (edgy I believe)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: kasper22 at tampabay.rr.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SmtpClient always tries to authenticate
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+Trying to use System.Net.Mail.SmtpClient to send mail and it is failing
+because System.Net.Mail.SmtpClient.Credentials is not null, even though I'm
+not setting it.  Mail server is Postfix 2.2.10
+
+
+Steps to reproduce the problem:
+using System;
+using System.Net.Mail;
+
+namespace email_test
+{
+        class MainClass
+        {
+                public static void Main(string[] args)
+                {
+                        MailMessage message = new
+MailMessage("bryan at bryanbrownreptiles.com", "bryan at bryanbrownreptiles.com",
+"test mail", "this is a test");
+
+                        SmtpClient client = new SmtpClient("localhost");
+                        //Uncomment the following line and it will work
+                        //client.Credentials = null;
+                        client.Send(message);
+
+                        Console.WriteLine("the message was sent");
+                }
+        }
+}
+
+
+Actual Results:
+
+Unhandled Exception: System.Net.Mail.SmtpException: 503 Error:
+authentication not enabled
+  at System.Net.Mail.SmtpClient.Authenticate (System.String Username,
+System.String Password) [0x00000]
+  at System.Net.Mail.SmtpClient.PerformAuthentication () [0x00000]
+  at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message)
+[0x00000]
+  at email_test.MainClass.Main (System.String[] args) [0x00000]
+
+
+Expected Results:
+Should just send mail without trying to send Authentication, for some
+reason the Credentials check at line 660 (1.2.4) does not equal null.
+
+How often does this happen? Always
+
+
+Additional Information: Smtp Server is Postfix 2.2.10


More information about the mono-bugs mailing list