hello
i want mail server in asp.net using c#
try
{
SmtpClient sm = new SmtpClient();
sm.Host = "localhost";
MailMessage m = new MailMessage();
m.To.Add("ttt@gmail.com");
m.From = new MailAddress("ccc@gmail.com");
//m.To.Add(new MailAddress(to.Text.ToString()));
//m.From = new MailAddress(from.Text.ToString());
m.Subject = subject.Text.ToString();
m.Body = body.Text.ToString();
sm.Send(m);
Label1.Text = "mail sent";
}
catch (SmtpException ex)
{
Label1.Text = ex.Message;
}
this is my program but the mail not send because
the error is
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for ttt@gmail.com