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
krishna angirekula
NA
68
29.9k
send mails
Dec 15 2014 9:47 AM
sending Emails to the gmail ..
i am using below code ..
public static void SendEmail(string emailbody)
{
// Specify the from and to email address
MailMessage mailMessage = new MailMessage("
[email protected]
", "
[email protected]
");
// Specify the email body
mailMessage.Body = emailbody;
// Specify the email Subject
mailMessage.Subject = "Exception";
// Specify the SMTP server name and post number
SmtpClient smtpClient = new SmtpClient("smtp.gmail.com", 587);
// Specify your gmail address and password
smtpClient.Credentials = new System.Net.NetworkCredential()
{
UserName = "
[email protected]
",// my mailid
Password = "*******"// my current password
};
// smtpClient.EnableSsl = true;
// SmtpServer.EnableSsl = true;
// Finall send the email message using Send() method
smtpClient.EnableSsl = true;
smtpClient.Send(mailMessage);
}
it shows the error {"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"}
Reply
Answers (
7
)
I am looking for latest Microsoft Certification70515
asp.net Gridview not Binding