I want to get email from LoggedIn Event should do. I use this follow
protected void Login_LoggedIn(object sender, EventArgs e)
{
if (Request.IsAuthenticated)
{
MembershipUser mu = Membership.GetUser();
string email = mu.Email;
//// send the mail
MailMessage msg = new MailMessage();
msg.IsBodyHtml = true;
msg.From = new MailAddress("xxx@abc", "NotebookShop");
msg.To.Add(new MailAddress(email));
msg.Subject = string.Format(Globals.Settings.ContactForm.MailSubject, "Account Access");
msg.Body = "Your Account was accessed on" + DateTime.Now + "<br/><br/>***If you did not access your account at this time, please contact NotebookShop from your logged in account.";
new SmtpClient().Send(msg);
}
}
But It not work! P ...
Go to the complete details ...