[Mono-list] Sending Mails through ASP.Net on Mono Linux server

Jyoti Seth jyotiseth2001 at gmail.com
Thu Apr 12 08:02:16 EDT 2007


Thanks for the reply. I changed my asp.net code to use opensmtp instead of
System.Net.Mail but now its giving another error 

 

"Smtp error occured: ERROR - Expecting: 250. Recieved: 530 5.7.0 Must issue
a STARTTLS command first 24sm3331267ugf"

 

Following is the code that I have used:

 

OpenSmtp.Mail.MailMessage msg = new OpenSmtp.Mail.MailMessage();

            

 
msg.AddRecipient("testuser at gmail.com",OpenSmtp.Mail.AddressType.To);

            msg.From = new OpenSmtp.Mail.EmailAddress("testuser at gmail.com");

            msg.Subject = "Test mail using .net2.0";

            msg.Body = "This is my msg Body";

 

            string MailServer  = "smtp.gmail.com"; 

            string MailUser   = "xxxxxx at gmail.com"; 

            string MailPass   = "xxxxx";

            int MailPort =  587;  

 

            OpenSmtp.Mail.SmtpConfig.SmtpPort = 587;

            OpenSmtp.Mail.SmtpConfig.SmtpHost = "smtp.gmail.com";

            OpenSmtp.Mail.Smtp oSmtp = new OpenSmtp.Mail.Smtp
("smtp.gmail.com",587);//MailServer, MailUser, MailPass, MailPort);

             oSmtp.Username="xxxxx at gmail.com";

             oSmtp.Password="xxxxx";

            

             oSmtp.SendMail(msg);

 

Please let me know where I am going wrong.

 

Thanks

 

 

From: Jorge Bastos [mailto:mysql.jorge at decimal.pt] 
Sent: Wednesday, April 11, 2007 6:09 PM
To: Jyoti Seth
Subject: Re: [Mono-list] Sending Mails through ASP.Net on Mono Linux server

 

I use opensmtp.net from sf.net, my opinion, its alot better then
system.net.mail

 

 

----- Original Message ----- 

From: Jyoti Seth <mailto:jyotiseth2001 at gmail.com>  

To: 'mono-list at lists.ximian.com' 

Sent: Wednesday, April 11, 2007 12:25 PM

Subject: [Mono-list] Sending Mails through ASP.Net on Mono Linux server

 

Hello,

 

I am using System.Net.Mail for sending mails in asp.net applications and it
is working fine on windows xp m/c. But when I publish this on suse linux
server with mono 2.0 and postfix smtp service installed and configured it
gives an error either "Unable to validate data" or "Service not available".

 

I have also read about sharpwebmail application on net for sending mails
through ASP.Net on linux. Please suggest what should be best to use to run
asp.net applications for sending mails on linux server.

 

Thanks,

Jyoti


  _____  


_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070412/6873d25c/attachment-0001.html 


More information about the Mono-list mailing list