I am trying to fix the behavior of a CreateUserWizard control in ASP.NET 2.0. With a fairly naive, out-of-the-box implementation, if you enter an email address that does not exist, or there is some other error sending the email, you get a YSOD showing the ugly details of the SMTP error, plus the user account is created anyway. Handling the SendMailError does not seem to help, as it is fired after the user is already created.
Ideally, an email error would cause an "invalid email address" error message (or something to that effect) to be displayed. Seems like this should be pretty easy, but after quite a bit of looking around I haven't found an answer. Anybody have any solutions?