Open piher opened 12 years ago
I don't quite understand this however I would very much like to! I was referred to this post from my question on Stack Overflow (http://stackoverflow.com/questions/11080214/how-to-receive-email-using-imap-from-gmail-whilst-on-proxy-with-firewall) but as I say I can't quite make heads nor tails of the solution! I would greatly appreciate any help you could give!
Hi JackEker, I'm really sorry for the (super) late reply, the project in wich I was using the library is now over. Actually when I wrote this post I was hoping that someone else would be interested in the matter because my attempts to implement this functionnality weren't succesful :/ I think the general idea is there but more work would need to be done with the starksoft library which is supposed to work. I hope that this wasn't a key functionnality in your project...
Hello,
I am exceptionally on a network that requires a proxy configuration. I thought I would try out my email software on this network, and as it turns out the TcpClient object doesn't work on proxies and doesn't seem to allow any proxy configuration.
Have you used your library through a proxy ?
If not, i have found a quite simple open-source C# library creating TcpClient objects through proxies : http://www.starksoft.com/prod_proxy.html
As an example, the connect method in Imap client could become something like :
public void Connect(string hostname, int port, bool ssl, string proxyHost = null, int proxyPort = -1, ProxyType proxyType = ProxyType.None) { try { Host = hostname; Port = port; Ssl = ssl;
and the imap constructor :
public ImapClient(string host, string username, string password, AuthMethods method = AuthMethods.Login, int port = 143, bool secure = false, string proxyHost = null, int proxyPort = -1, ProxyType proxyType = ProxyType.None) { Connect(host, port, secure, proxyHost, proxyPort, proxyType); AuthMethod = method; Login(username, password); }