[Mono-bugs] [Bug 80110][Maj] New - System.Net.Mail with enableSSL set to true fails to issue start tls command

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Nov 30 23:10:36 EST 2006


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 dwmcqueen at gmail.com.

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

--- shadow/80110	2006-11-30 23:10:36.000000000 -0500
+++ shadow/80110.tmp.12642	2006-11-30 23:10:36.000000000 -0500
@@ -0,0 +1,67 @@
+Bug#: 80110
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Ubuntu 6.10
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Major
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: dwmcqueen at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Net.Mail with enableSSL set to true fails to issue start tls command
+
+Description of Problem:
+The System.Net.Mail client on Mono 1.1.7 fails with 
+aMustIssueStartTLSCommand error when sending mail through a secure SMTP 
+server. 
+
+Steps to reproduce the problem:
+1. 
+
+Use code similar to this:
+
+System.Net.Mail.MailMessage eMail = 
+				new System.Net.Mail.MailMessage(mailFrom, 
+				                                mailTo);
+			
+			eMail.Body = message;
+			eMail.Subject = "Signal";
+			
+			System.Net.Mail.SmtpClient mailClient = 
+								new
+	System.Net.Mail.SmtpClient();
+
+
+			System.Net.NetworkCredential 
+basicAuthenticationInfo = 
+				new System.Net.NetworkCredential(smtpUser, 
+smtpPassword);
+
+	
+			mailClient.Host = smtpServer;
+			mailClient.Port = smtpPort;
+			mailClient.EnableSsl = true;
+			mailClient.UseDefaultCredentials = false;
+			mailClient.Credentials = basicAuthenticationInfo;
+			try 
+			{
+		    	mailClient.Send(eMail);
+			} catch (System.Net.Mail.SmtpException ex) {
+				Console.WriteLine( ex.StatusCode);
+			} 
+
+
+Actual Results:
+SMTP Transport error - MustIssueStartTlsFirst.  Email not sent
+
+Expected Results:
+Email sent
+
+How often does this happen? 
+Every time.


More information about the mono-bugs mailing list