Click here to Skip to main content
16,005,181 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI
I am send the smtp mail in hotmail and rediffmail and get error

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STAR


how to solved this error.....

plz halp me..
Posted
Comments
ridoy 30-Jul-13 3:16am    
you need to provide your code or detail info about your query to get help from us.

Hi,

There're two possibilities. The first one is that SSL isn't enabled. Add this line:
C#
yourSmtpClient.EnableSsl = true; // if this line is added already, you don't need to add it a second time

The second possibility is that you didn't provide credentials. Add this line:
C#
yourSmtpClient.Credentials = new System.Net.NetworkCredential("yourUsername@example.com", "yourPassword"); // if this line is added already, you don't need to add it a second time

Hope this helps.
 
Share this answer
 
v2
dear sir

i have this code
C#
MailMessage oMail = new MailMessage();
           oMail.From = new MailAddress("pktripathi1987@gmail.com");
           oMail.To.Add("pktripathi1987@gmail.com");
           oMail.Subject = "Contact Form";
           oMail.Body = body;
           oMail.IsBodyHtml = true;
           oMail.Priority = MailPriority.High;
           SmtpClient SmtpMail = new SmtpClient();
           SmtpMail.Host = "smtp.live.com";
           // SmtpMail.Port = int.Parse(port);
           SmtpMail.EnableSsl = true;
           SmtpMail.DeliveryMethod = SmtpDeliveryMethod.Network;
           SmtpMail.UseDefaultCredentials = false;
           SmtpMail.Credentials = new System.Net.NetworkCredential("Email@hotmail.com", "pass");
           SmtpMail.Send(oMail);
           oMail.Dispose();
           return "1";



but get error

VB
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STAR
 
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