Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. How to send mail [Error: The SMTP server requires a secure connection or the client was not authenticated]

How to send mail [Error: The SMTP server requires a secure connection or the client was not authenticated]

Scheduled Pinned Locked Moved WPF
csharpcomsysadminsecurityhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nekkantidivya
    wrote on last edited by
    #1

    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.

    M E 2 Replies Last reply
    0
    • N Nekkantidivya

      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.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      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:

      1 Reply Last reply
      0
      • N Nekkantidivya

        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.

        E Offline
        E Offline
        earlgraham
        wrote on last edited by
        #3

        Does you config file have that server? Silverlight email application[^]

        Programmer Glenn Earl Graham Austin, TX

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups