Hi,
I have been making a page called forgottenpassword.aspx which sends an email to the registered user that contains their password.
I can get the email to send no problems but trying to get the user's name from a field called RegUserName and the Password stored for them included in the body of the message is proving to be slightly more of a problem.
Any assistance would be appreciated :-) My code is below
<h2>
Forgot Password</h2>
<br />
<script language="VB" runat="server">
Sub btnSendMail_OnClick(ByVal Source As Object, ByVal E As EventArgs)
Dim strEmail As String
Dim myMessage As New MailMessage
Dim mySmtpClient As SmtpClient
If Page.IsValid() Then
strEmail = txtEmailAddress.Text
myMessage.From = New MailAddress("sender@domain.com", "From Me")
...
Go to the complete details ...