I'm trying to send an email when a new account is registered with the CreateUserWizzard but no email is being sent. I know my SMTP settings are correct because I have implemented a password recovery system that sends email fine. I added the OnSendingMail property to check and see if it is even trying to send mail by writing some test text to the screen but the sendingmail event isn't even firing. As far as I know all I need to do is insert the mail definition section and create a mail body file, which I have done. Any help would be appreciated. Code is below:
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
<MailDefinition From="firstname.lastname@example.org" Subject="Your Account Has Been Created"
Protected Sub CreateUserWizard1_SendingMail(ByVal sender As Object, ByVal e As EventArgs) Handles CreateUserWizard1.SendingMail
Response.Write("mail is sending")
EDIT: apparently the code pasted funky in the insert code section so I repasted it plain text
Maybe the email server require the username and password.
host="smtp.gmail.com" port="587" username="email@example.com" password="yourgmailaccountpassword"
another reason is that the client comtomer firewall drop the email.