How to send mail [Error: The SMTP server requires a secure connection or the client was not authenticated]
-
Hi, I am working on a silverlight application. In this I need to send mail from a .aspx page. But while sending mail I am getting the below exception "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required." Code I hve written is string to = "test2@gmail.com"; System.Net.Mail.MailMessage MyMailMessage = new System.Net.Mail.MailMessage("test1@gmail.com", to,"Hi", "Test"); MyMailMessage.IsBodyHtml = true; System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential("test1@gmail.com", "pswpsw"); System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587); mailClient.EnableSsl = true; mailClient.UseDefaultCredentials = false; mailClient.Credentials = mailAuthentication; mailClient.Send(MyMailMessage); If you have have any idea to solve this please reply me. Thanks in advance.
-
Hi, I am working on a silverlight application. In this I need to send mail from a .aspx page. But while sending mail I am getting the below exception "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required." Code I hve written is string to = "test2@gmail.com"; System.Net.Mail.MailMessage MyMailMessage = new System.Net.Mail.MailMessage("test1@gmail.com", to,"Hi", "Test"); MyMailMessage.IsBodyHtml = true; System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential("test1@gmail.com", "pswpsw"); System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587); mailClient.EnableSsl = true; mailClient.UseDefaultCredentials = false; mailClient.Credentials = mailAuthentication; mailClient.Send(MyMailMessage); If you have have any idea to solve this please reply me. Thanks in advance.
Since this question has nothing to do with Silverlight, you may get more response on perhaps the .NET Framework or ASP.NET board. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hi, I am working on a silverlight application. In this I need to send mail from a .aspx page. But while sending mail I am getting the below exception "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required." Code I hve written is string to = "test2@gmail.com"; System.Net.Mail.MailMessage MyMailMessage = new System.Net.Mail.MailMessage("test1@gmail.com", to,"Hi", "Test"); MyMailMessage.IsBodyHtml = true; System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential("test1@gmail.com", "pswpsw"); System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587); mailClient.EnableSsl = true; mailClient.UseDefaultCredentials = false; mailClient.Credentials = mailAuthentication; mailClient.Send(MyMailMessage); If you have have any idea to solve this please reply me. Thanks in advance.
Does you config file have that server? Silverlight email application[^]
Programmer Glenn Earl Graham Austin, TX