hi I'm trying to use this code that i found to send an email message using c# application.
i have an iis service running on my computer and the smtp server is configured as my providers smtp server.
the problem is that when i try to send mail i get an error message:
"the specified string is not in the form required for an e-mail address"
i swear to god that i insert a valid mail address.
my code is:
MailMessage message = new MailMessage(to, from, subject, mess); SmtpClient client = new SmtpClient("mail.bezeqint.net"); client.UseDefaultCredentials = true; client.Send(message); return "Message sent to " + to + " at " + DateTime.Now.ToString() + ".";