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

Jorge Bastos mysql.jorge at decimal.pt
Thu Apr 12 08:50:03 EDT 2007


ah, the server you're using to send emails requires you to use SSL via STARTTLS, wich is the gmail smtp server.
with opensmtp i didn't tryed to use starttls, i don't if it supports at all.
check the docs if it supports


  ----- Original Message ----- 
  From: Jyoti Seth 
  To: 'Jorge Bastos' 
  Cc: mono-list at lists.ximian.com 
  Sent: Thursday, April 12, 2007 1:02 PM
  Subject: RE: [Mono-list] Sending Mails through ASP.Net on Mono Linux server


  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 

    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/efacaf16/attachment.html 


More information about the Mono-list mailing list