Click here to Skip to main content
15,940,921 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
am sending a mail form Asp.net,that time i have generate an error ...
the error show below;

'The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.'



Please Help me..any reference?
it's very urgent....
Posted
Updated 1-Jan-12 18:32pm
v3

1 solution

Most SMTP server require you to be authenticated before sending mails through them (avoiding and blocking spammers).

See this : http://www.aspnettutorials.com/tutorials/email/email-auth-aspnet2-csharp.aspx[^]
 
Share this answer
 
Comments
Mohammed Asif.K 2-Jan-12 0:34am    
My Code Like This:
------------------------
public bool Send_Email_touser(string name, string email, string mobile, string Message)
{
bool status = false;
try
{

string msg = "<html><body>Hi " + name + "," + "<br/>"
+ "Thank's for contacting with ''." + "<br/>"
+ "We are eager to assist you and serve you better." + "<br/>"
+ "It's an easy and faster approach to reach your properties at the click of your mouse." + "<br/>"
+ "Regards," + "<br/>" + "<br/>" + " | " + "<br/>"
+ "" + "<br/>"
+ "</body></html>";

MailHelper.SendMailMessage(ConfigurationManager.AppSettings["weddingle_mail"].ToString(), email, "", "", "[] - Contact Us", msg);
}
catch (Exception ex)
{
lbl_Exception_Mail.ForeColor = Color.Red;
lbl_Exception_Mail.Text = ex.ToString();
}
return status;
}
Mohammed Asif.K 2-Jan-12 0:35am    
So This Code How can i change?
Mehdi Gholam 2-Jan-12 0:42am    
Read the link provided.
Sergey Alexandrovich Kryukov 2-Jan-12 0:48am    
Sure, a 5.
Happy New Year!
--SA
Mehdi Gholam 2-Jan-12 0:50am    
Cheers, and all the best

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900