views:

29

answers:

2

i am trying to use the password recovery control provided by asp.net 3.5 and i get this error when the user presses submit :

Microsoft JScript runtime error: 
Sys.WebForms.PageRequestManagerServerErrorException:  
The specified string is not in the form required for an e-mail address.

i am sure that the email address of the user (who needs pass recovery) is correct ([email protected]).
and i am also sure that my smtp settings in web.config are correct. The email of the sender is in the form of [email protected]
so what am i doing wrong? i don't know where to start debugging so i can find the problem!

A: 

Could you debug and give the parameters you are passing to the Send function? (more exactly the From and To parameters) Most likely the problem is in one of those 2 parameters.

For documentation regarding the MailAddress class see this.

Ando
A: 

The error message is probably telling the truth, ideally get some output at the 'most final' stage you can - right before the error occurs. It could be you've accidentally added 'mailto:' at the beginning, or there's a space before or after, or a newline, or something like that.

If you could post the exact output, surrounded by quotes or brackets to see if there is whitespace before or after, it should become obvious what the problem is - else please post a comment to this answer and we will be happy to diagnose further.

Hope that helps!

Kieren Johnstone