i tried to send simple mail in asp.net.it doesn't work.
Here is code:
protected void Button2_Click(object sender, EventArgs e)
{
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gorenparmak.com");
mail.From = new MailAddress("radyo@gorenparmak.com");
mail.To.Add("radyo@gorenparmak.org");
mail.Subject = "Test Mail - 1";
mail.Body = "mail with attachment";
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("radyo@gorenparmak.com", "write password");
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
}
Error produced when I run it:
The remote name could not be resolved: 'smtp.gorenparmak.com'
How I can solve this problem?