By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,665 Members | 1,513 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,665 IT Pros & Developers. It's quick & easy.

Prevent error on bad email address during user creation on wizard asp.net 2.0

P: n/a
I am using the user creation wizard in asp.net 2.0 and using it to send the
user an email message when their account is created, well this works great
if the address is a valid mailbox, but when it is not it throws an exception
(shown below) how do i prevent this?

Description:
System.Web.HttpUnhandledException: Exception of type
'System.Web.HttpUnhandledException' was thrown. --->
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: 5.1.1 User unknown
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at System.Web.UI.WebControls.LoginUtil.SendPasswordMa il(String email,
String userName, String password, MailDefinition mailDefinition, String
defaultSubject, String defaultBody, OnSendingMailDelegate
onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate,
Control owner)
at System.Web.UI.WebControls.CreateUserWizard.Attempt CreateUser()
at
System.Web.UI.WebControls.CreateUserWizard.OnNextB uttonClick(WizardNavigationEventArgs
e)
at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Obj ect source,
EventArgs e)
at System.Web.UI.WebControls.CreateUserWizard.OnBubbl eEvent(Object
source, EventArgs e)
at System.Web.UI.WebControls.Wizard.WizardChildTable. OnBubbleEvent(Object
source, EventArgs args)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEven t(String
eventArgument)
at
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.public_application_aspx.ProcessRequest(HttpCon text context)
at
System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)

Jul 19 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.