string from = "[email protected]";
string to = "[email protected]";
string subject = "正文";
string body = "<html><body>正文 - 收到</body></html>";
SmtpMail.SmtpServer = "";
SmtpMail.Send(from, to, subject, body);使用如上代码实现发送电子邮件的时候。
SmtpMail.SmtpServer的属性怎么设置啊?我没有自己的邮件服务器。
我用的win2k server,装了smtp服务,但是写上自己的机器名也不好哟个。大概是没配置好吧。
请问应该怎么解决?
谢谢
string to = "[email protected]";
string subject = "正文";
string body = "<html><body>正文 - 收到</body></html>";
SmtpMail.SmtpServer = "";
SmtpMail.Send(from, to, subject, body);使用如上代码实现发送电子邮件的时候。
SmtpMail.SmtpServer的属性怎么设置啊?我没有自己的邮件服务器。
我用的win2k server,装了smtp服务,但是写上自己的机器名也不好哟个。大概是没配置好吧。
请问应该怎么解决?
谢谢
应该考虑到smtp.abc.com.具体不一定必须是这种格式,也可以IP地址.比如网易的就可以填写"smtp.163.com";视你的邮件服务提供商的设置.
添上网易的smtp.163.com发不出去
我早就试过了
http://jzywh.cnblogs.com/archive/2005/06/09/170783.html2. 使用其他mail服务,需要有信箱的schema验证:
objMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
// 信箱名: [email protected] 等。
objMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", txtUserName.Text.Trim());
// 密码。
objMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", txtPassword.Text.Trim());
单独做一个smtp服务器暂时没人管,老是被黑。所以想找个不用自己做邮件服务器的方法来发。
http://systemwebmail.com/