[Mono-list] Problem with system.net.mail
Gianluca Simoni
gianluca.simoni at cstnet.it
Wed Jun 13 10:48:35 EDT 2007
Hi,
I'm using the version 1.2.4 of Mono and try to use
system.net.mail to send a simple mail.
This is the code:
MailMessage message = new MailMessage();
message.From = new MailAddress("gianluca.simoni at cstnet.it");
message.To.Add(new MailAddress("gianluca.simoni at cstnet.it"));
message.Subject = "This is my subject";
message.Body = "This is the content";
SmtpClient client = new SmtpClient();
client.Host = "smtp-net.cstgroup-pcb.com";
client.Send(message);
It'work with .Net but non with Mono where I've this error:
C:\lavoro\odbc_informix\odbc_informix\bin\Release>mono odbc_informix.exe
Unhandled Exception: System.Net.Mail.SmtpException: 502 5.5.2 Error: command
not recognized
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 odbc_informix.Program.Main (System.String[] args) [0x00000]
Please help me. Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070613/3ca214ba/attachment.html
More information about the Mono-list
mailing list