I want to send email via SMTP via proxy on visual studio. Is there any email sending library which would support proxy ?
问题:
回答1:
I'm not sure exactly what you are asking.
When you talk about sending via a proxy can you give more detail?
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.
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.
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"
回答2:
You can try using starksoft proxy (it's free), but it contains several bugs so be careful: http://www.starksoft.com/prod_proxy.html
You may want to try Mail.dll email component it supports HTTP and SOCKS proxies.
Please note that I'm the author of Mail.dll and it's not free.
You can check out how to use proxies with Mail.dll here:
http://www.limilabs.com/blog/imap-pop3-smtp-via-http-socks-proxy
回答3:
I'm assuming you are referring to a Socks Proxy server.
This is a shameless plug, but since you didn't specify you wanted an open source, or a free library, all of my email components at www.advancedintellect.com have Socks proxy support.