Question

I have the OnSendingMail event declared in the CreateUserWizard markup. I have the code in the code-behind file as well as the mail settings in the web.config, yet if I put a break point on the SendingMail method, it doesn't even hit the break point and I can't figure out why it is not happening.

Here is my SendingMail method:

protected void CreateUserWizard1_SendingMail(object sender, MailMessageEventArgs e)
{
    MembershipUser user = Membership.GetUser(CreateUserWizard1.UserName);

    string loginurl = "http://localhost:2030/login.aspx";

    e.Message.Body = e.Message.Body.Replace("<%VerifyUrl%>", loginurl);

}
Was it helpful?

Solution

I don't know why this was the issue, but I basically had to recreate the CreateUserWizard1_SendingMail and then it magically worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top