I am trying to send the user an email and I used this code:
MailMessage pMail = new MailMessage();
pMail.From = new MailAddress("email@website.com");
pMail.To.Add(new MailAddress(eBox.Text));
pMail.Subject = "Elwazefa Password Reset";
pMail.Body = "Content";
SmtpClient sClient = new SmtpClient();
sClient.Send(pMail);
prError.Text = "An Email with further instructions has been sent to you";
and I am getting this error:
The specified string is not in the form required for an e-mail address.
I also configured the smtp setting in the web.config file and tested it and it’s working fine
thanks
Looks like
ebox.Textdoesn’t contain a valid email address. Check the value you are entering in this textbox is a well formed email address.