I am trying to send an email asp.net, using the System.Net.Mail.SmtpClient class.
However I am getting the following exception message:
The parameter
This exception is being thrown by the MailAddress
constructor. It means you are trying to add an empty string as an email address, which is not valid.
In this case it means toEmailAddress
is an empty string.
try
message.To.Add(New MailAddress(toEmailAddress));
and verify the content of the variable "toEmailAddress".