I am sending a mail using system.net.mail.smtpclient, but show the error message "localhost does not exist", see the below code as follows,
private void button1_Click(object sender, EventArgs e)
MailAddress from = new MailAddress("firstname.lastname@example.org");
MailAddress to = new MailAddress("email@example.com");
MailMessage message = new MailMessage(from, to);
message.Subject = "Using the SmtpClient class.";
message.Body = @"Using this feature, you can send an e-mail message from an application very easily.";
SmtpClient client = new SmtpClient(localhost);
and one more doubt, if set localhost email where goes to store in the system.
What could be the problem?
Thanks and regards
Kirubaharan [ kkaran_sin ( at ) yahoo dot com ],