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
Niranjan Poddar
875
648
95.6k
sending mail error(gmail)
Mar 11 2015 6:00 AM
Dear all,
Please give me solution:
before i used this code it was working.............
string Email = dtUser.Rows[0]["VC_EMAIL"].ToString().Trim();
string uid = Encrypt(dtUser.Rows[0]["IN_ID"].ToString());
string UsName = Encrypt(dtUser.Rows[0]["VC_USERNAME"].ToString());
MailMessage mail = new MailMessage();
mail.To.Add(txtMail.Text.ToString().Trim());
mail.From = new MailAddress("
[email protected]
");
mail.Subject = "RIDF Reset Password link";
string Body = "<h2><u> Request for Reset Password </u></h2><br/><a href='http://localhost:2536/RIDF/ResetPassword.aspx?uid=" + uid + "&dn=" + UsName + "' target='_blank'>Please Reset your password....</a> ";
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address
smtp.Credentials = new System.Net.NetworkCredential
("
[email protected]
", "fdafds");
smtp.Port = 587;
//sendEmail(Body, Email);
smtp.EnableSsl = true;
smtp.UseDefaultCredentials = true;
smtp.Send(mail);
return true;
but this code is not working now:
showing error -An exception of type 'System.Net.Mail.SmtpException' occurred in System.dll but was not handled in user code
Additional information: Failure sending mail.
Reply
Answers (
2
)
Asp.net and Asp.net mcv5 password authentic
Getting the data from database in asp??