Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



Send Mail The SMTP server requires a secure connection or the client was not authenticated Exception ASP .NET

Home   ASP.NET   Send Mail The SMTP server requires a secure connection or the client was not authenticated Exception ASP .NET         



Well I had the same problem. Finally I got it fixed. 

"Password Was Wrong"

If You are looking for some code

        Dim oMailMessage As New MailMessage("yourmail@gmail.com", "recipeint@yahoo.com", 
"Test Mail", "Hello World This is just a test")
        Dim oSmtpClient As New SmtpClient
        oSmtpClient.Host = "smtp.gmail.com"
        oSmtpClient.EnableSsl = True
        oSmtpClient.Port = "587"
        oSmtpClient.Credentials = New System.Net.NetworkCredential("your gmail id", "yourpassword")
        oSmtpClient.Send(oMailMessage)


Here's a working code for sending mail using gmail. for sending mail using yahoo 
you need a yahoo mail plus connection

        Dim oMailMessage As New MailMessage("muruganad@gmail.com", 
"murugan_ad@yahoo.com", "Test Mail", "Hello World This is just a test")
        Dim oSmtpClient As New SmtpClient
        oSmtpClient.Host = "smtp.gmail.com"
        oSmtpClient.EnableSsl = True
        oSmtpClient.Port = "587"
        oSmtpClient.Credentials = New 
System.Net.NetworkCredential("murugan.ad", "*****")
        oSmtpClient.Send(oMailMessage)





  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam