I have a form that used to send an email to someone who had posted a listing on my site, with a copy to the sending user.
The code below is intended to catch the exception that occurs when email address of the person posting the listing (TxtBxTo.Text) is not valid, and also intended to catch the (unlikely) event that the user has entered and confirmed an invalid email (TxtBxEmail.Text) for himself on the form.
I have tested this code for all combinations of valid and invalid email addresses for the listing poster and the user filling out the form and sending the email
Everything works fine except for the situation where the email address for the listing poster is valid but that of the user is invalid.
In this situation I am getting the message on the ConfirmResaleEmail.aspx page that says: "Your message has been sent to the contact person, with a copy to you. " when I should be getting "Woops, it looks like your own email failed when we tried to send you your copy. "
I am hoping some sharp-eyed person can spot the problem. Here is the code:
' this sends email from a user with email TxtBxEmail to the contact perons listed in TxtBxTo msg = New MailMessage(TxtBxEmail.Text, TxtBxTo.Text, TxtBxSubject.Text, sb.ToString()) &n
View Complete Post