问题描述
我想通过 Visual Studio 上的代理通过 SMTP 发送电子邮件.是否有任何支持代理的电子邮件发送库?
I want to send email via SMTP via proxy on visual studio. Is there any email sending library which would support proxy ?
推荐答案
我不确定你在问什么.
当您谈到通过代理发送时,您能提供更多细节吗?
When you talk about sending via a proxy can you give more detail?
如果您的意思是我如何通过 HTTP 代理发送 SMTP",则不能.HTTP 代理仅支持 HTTP 和 HTTPS,虽然一些代理服务器也支持 FTP、SOCKS 等,但不支持(据我所知)SMTP.
If you mean "how do I send SMTP over an HTTP proxy", you can't. HTTP proxies only support HTTP and HTTPS, although some proxy servers also support FTP, SOCKS, etc but not (as far as I know) SMTP.
有 SMTP 代理之类的东西,但我认为它们并不常见;我认为它们都是专有的实现.我当然没有见过处理这种代理的 C# 库,而且我不认为有一个单一的标准 - 我找不到指定标准的 RFC(或等效文档).
There is a such a thing as an SMTP proxy but I don't think they are very common; I think they are all proprietary implementations. I certainly have not seen a C# library to handle such a proxy, and I don't think there is a single standard for this - I've failed to find an RFC (or equivalent document) that specifies the standard.
与使用 SMTP 代理不同,使用存储转发"邮件传输代理 (MTA) 更为正常.换句话说,您将设置一个普通的 MTA,并让它接收电子邮件并将它们转发到其他 MTA.如果您的设置是这种情况,则不需要特殊的代码或库.只需使用 SmtpMail 类将您的电子邮件直接发送到您当地的 MTA,而不必担心它实际上是在充当转发器"
Instead of using an SMTP proxy, It is more normal to have a "store-and-forward" mail transfer agent (MTA). In other words you would set up a normal MTA, and have this receive emails and forward them on to other MTAs. If this is the case in your setup, there is no special code or libraries required. Just sending your email direct to your local MTA using the SmtpMail class and not worry about the fact it is really acting as a "forwarder"
这篇关于是否有用于通过代理发送电子邮件的 .NET 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!