我想在我的asp.net应用程序发送邮件。
它是目前工作在一台服务器(域),但它是不工作的变化(域名)服务器,为什么这个问题?
是SMTP不同的服务器或域有什么不同?
我的代码是
我的问题是,SmtpMail.SmtpServer.Insert(0,"83.245.63.194")是不同的不同的服务器或网站或域。DataSet ds = new DataSet();
MailMessage mail1 = new MailMessage();
mail1.From = txtemail.Text;
ds.ReadXml(Server.MapPath(" /Admin/xml/feedbackmail.xml"));
mail1.To = ds.Tables[0].Rows[0][0].ToString();
mail1.Body = "Sender : " + txtemail.Text + "\n" + "Name : " + txtname.Text + "\n" + "Phone : " + txtPhone.Text + "\n" + "\n" + "Sub:" + txtsubject.Text + "\n" + "Body :" + txtmsg.Text;
SmtpMail.SmtpServer.Insert(0, "83.245.63.194");
SmtpMail.Send(mail1);
我的错误是"SendUsing"配置值无效。