问题描述
我们有一个托管在Windows服务中的WCF服务,该服务需要使用Windows 2008默认SMPTP服务发送电子邮件
此外,WCF服务也托管在Windows 2008服务器中。
有没有人真正这样做过?有人可以帮我们吗? SmtpClient client = new SmtpClient ( " localhost" ,25); Is there anyone who has actually done this? Can someone help us on this? SmtpClient client = new SmtpClient("localhost", 25); } 这篇关于通过Windows 2008 SMTP服务发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
如果有任何资源请告诉我。
这是我编写的代码,似乎不起作用
MailMessage mailMessage = new MailMessage ( " [email protected]" , " [email protected]" , " Testing" , "请注意" );
client.Host = " 127.0.0.1" ;
client.Send(mailMessage);
If there any resource on this please let me know.
This is the code that I have written and does not seem to work
MailMessage mailMessage = new MailMessage("[email protected]", "[email protected]", "Testing", "Attention Please");
client.Host = "127.0.0.1";
client.Send(mailMessage);推荐答案