TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kannan
NA
47
0
SmptClient is not working...
Dec 21 2009 6:12 AM
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. 21sm5152578pzk.3
System.Net.Mail.MailMessage mymail = new System.Net.Mail.MailMessage("fromAddress", "Toaddress");
mymail.Body = "message body";
mymail.Subject = "message subject";
System.Net.Mail.SmtpClient mysmtpclient = new System.Net.Mail.SmtpClient("smtp.gmail.com.",587);
mysmtpclient.EnableSSL= true;
mysmtpclient.UseDefaultCredentials = false;
mysmtpclient.Credentials = new System.Net.NetworkCredential("gmail id", "gmail password");
mysmtpclient.Send(mm);
I got the exception
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. 21sm5152578pzk.3
Even i had changed the port number to 465, it wont work. But using chilkat smtpclient it is working. How can i overcome this? Please help me!
Reply
Answers (
2
)
login control with ssl encryption
What is authentication in asp.net 2.0?