943,027 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 2862
  • ASP.NET RSS
May 4th, 2009
0

Password Recovery Control Problem

Expand Post »
I have started with ASP.Net just 1 month. Right now, my project may implement the control that users can recovery their password by answering question. We all know that Visual Studio or Visual Web Developer has a control name Password Recovery Control, just drag and drop. So far I have set user in my ASP.Net Web Administration. But according to 1 video that I already seen, when we add new user or role within the project or website, the project will generate the database to store that, but I never seen that one on my project. Second thing that I have trouble is sending an email. Actually, I don't have any SMTP mail server, so I use Gmail instead. I know that Gmail use SSL, but on the property of Password Recovery Control doesn't have the property to see SSL enable. So I work around by using event Sending Mail, but it causes error. Here my code, and I just want to send to user a simple email that say his password is something.
ASP.NET Syntax (Toggle Plain Text)
  1. System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage("mygmail@gmail.com", e.Message.To.ToString(), e.Message.Subject.ToString(), e.Message.Body.ToString());
  2. msg.Priority = System.Net.Mail.MailPriority.High;
  3. System.Net.Mail.SmtpClient smtpSender = new System.Net.Mail.SmtpClient("smtp.google.com", 587);
  4. smtpSender.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
  5. smtpSender.Credentials = new System.Net.NetworkCredential("mygmail@gmail.com", "mypassword");
  6. smtpSender.EnableSsl = true;
  7. smtpSender.Send(e.Message); ->> this cause error
  8. e.Cancel = true;
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
NguyenThai is offline Offline
15 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: pass querystring from hyperlink in a datagri
Next Thread in ASP.NET Forum Timeline: label and dropdownlist





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC