I am getting the following exception when using System.Net.Mail in mono 1.2.4_4:

Unhandled Exception: System.Net.Mail.SmtpException: 500 5.5.1 Command unrecognized: "AUTH LOGIN" 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 MonoTestConsoleApplication.Program.Main (System.String[] args) [0x00000]

Here is the code:

System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("[EMAIL PROTECTED]", "[EMAIL PROTECTED]");
            message.Subject = "Test From Mono";
            message.Body = "<b>THIS IS COOL</b>";
            message.IsBodyHtml = true;

System.Net.Mail.SmtpClient server = new System.Net.Mail.SmtpClient("localhost"); server.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
            server.Send(message);

When I run the following code using the old System.Web.Mail namespace it works perfectly:

System.Web.Mail.MailMessage oldMessage = new System.Web.Mail.MailMessage();
            oldMessage.To = "[EMAIL PROTECTED]";
            oldMessage.From = "[EMAIL PROTECTED]";
            oldMessage.Subject = "OLD MONO";
            oldMessage.BodyFormat = System.Web.Mail.MailFormat.Html;
            oldMessage.Body = "<b>THIS IS COOL</B>";

            System.Web.Mail.SmtpMail.SmtpServer = "localhost";
            System.Web.Mail.SmtpMail.Send(oldMessage);


Any help will be very much appreciated.
Thanks,
Ken


Kenneth H. Brannigan
CTO

Vitruvian Solutions®, LLC
Mobile: 201.602.6542
E-mail: [EMAIL PROTECTED]
Web: www.vitruviansolutions.com

The contents of this e-mail are privileged and confidential. This e- mail is intended to be read only by the individual(s) or entity to whom it is addressed. If you are not the intended recipient of this e- mail, please notify the sender and delete the e-mail. Any review, retransmission, dissemination, copying or other use of this e-mail or its contents is strictly prohibited.





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

Reply via email to