发送邮件与System.Net.Mail

时间:2022-08-21 18:17:59

I have a requirement to build a .net 3.5 webpage for a client which will automatically email users, taking addresses from a customer database.

我需要为一个客户端构建一个。net 3.5的网页,它会自动地给用户发送电子邮件,从客户的数据库中获取地址。

I can get this working fine for internal mail using the system.net.mail, but can anyone tell me if this is suitable if the clients email service is through a 3rd party, rather than having their own exchange server?

我可以使用system.net.mail来处理内部邮件,但是如果客户的邮件服务是通过第三方而不是拥有自己的交换服务器,谁能告诉我这是否合适呢?

I heard the best way to go is using his suppliers smtp relay service, can anyone point me in the direction of any examples of this, or even an idea of whats involved?

我听说最好的办法是使用他的供应商smtp中继服务,谁能给我指出这个例子的方向,甚至是一个关于它的想法?

thanks

谢谢

DD

DD

1 个解决方案

#1


1  

System.Net.Mail does this for you. Make sure you use the System.Net.Credentials to provide both the proxy authentication and the SMTP server authentication and all should work fine. for more information look up the msdn site.

System.Net。邮件为你做这些。确保你使用System.Net。凭据提供代理身份验证和SMTP服务器身份验证,所有这些都应该可以正常工作。更多信息请访问msdn网站。

#1


1  

System.Net.Mail does this for you. Make sure you use the System.Net.Credentials to provide both the proxy authentication and the SMTP server authentication and all should work fine. for more information look up the msdn site.

System.Net。邮件为你做这些。确保你使用System.Net。凭据提供代理身份验证和SMTP服务器身份验证,所有这些都应该可以正常工作。更多信息请访问msdn网站。