Click here to Skip to main content
15,905,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at

XML
MailMessage Msg = new MailMessage();
           SmtpClient Smtp = new SmtpClient();
           EmailID = txtEmailID.Text.Trim();
           Msg.From = new MailAddress("PrasadAnumolu999@gmail.com");
           Msg.To.Add(EmailID);
           Msg.Subject = "Please Confirm You Activation Link";
           ActivationURL = Server.HtmlEncode("http://localhost:2759/EmailVarification.aspx" + "&EmailID=" + EmailID);
           Msg.Body="Hi" +txtEmailID.Text.Trim() +"!\n" +
               "Thanks For You Interest For Visiting My Web Site <a href='http://stuffuser.blogspot.in/'> STUFFUSER.in</a>" +
                        " Please <a href='" + ActivationURL + "'>click here to activate</a>  your account and enjoy our services. \nThanks!";

           Msg.IsBodyHtml = true;
           Smtp.Port = 25;
           Smtp.Host = "Smtp.Gmail.com";
           Smtp.EnableSsl = true;
           Smtp.Credentials = new NetworkCredential("PrasadAnumolu@gmail.com", "sai!#%&(99");
           Smtp.Send(Msg);
Posted
Updated 12-Aug-14 22:26pm
v3
Comments
OriginalGriff 13-Aug-14 2:07am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Sai Prasad anumolu 13-Aug-14 2:09am    
kkk
[no name] 13-Aug-14 4:11am    
Can u put your mail sending code here

1 solution

If that is your actual password you may want to remove it!!

I would also advise that you check the port setting. 25 is rarely used for ssl connections.
I think gmail may be 465?
 
Share this answer
 

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