The Updated code:
loginInfo.Body = "EmailAddress: " + dsPwd.Tables[0].Rows[0]["EmailAddress"] + "<br /><br />Password: " + dsPwd.Tables[0].Rows[0]["Password"] + "<br /><br />";
loginInfo.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("mail.fastfix.com");
smtp.Host = "mail.fastfix.com";
smtp.Port = 25;
smtp.EnableSsl = true;
smtp.Credentials = new System.Net.NetworkCredential("@EamilAddress", "YourEmailPassword");
try
{
smtp.Send(loginInfo);
lblMessage.Text = "Password is sent to your email";
}
catch (Exception ex)
{
lblMessage.Text = "Oops, Something Went Wrong When We Tried to Send The Email";
return;
}
}
else
{
lblMessage.Text = "Email Address Not Registered";
}
}
}