So I'm trying to connect via A sock5 port into imap Client. I cant set UserName I get NullReference.
The current example is with example links none are real host etc..
using (var client = new ImapClient())
{
client.ProxyClient = new Socks5Client("host", 88);
client.ProxyClient.ProxyCredentials.UserName = "username";
client.ProxyClient.ProxyCredentials.Password = "password";
client.ProxyClient.Connect("imap.example.com", 9951);
client.Authenticate("mail", "passowrd");
}
No.
using (var client = new ImapClient ()) {
var credentials = new NetworkCredential ("username", "password");
client.ProxyClient = new Socks5Client ("host", 88, credentials);
client.Connect ("imap.example.com", 995, SecureSocketOptions.SslOnConnect);
client.Authenticate ("username", "password");
}
Hello Jeffrey,
is it the same approach for smtp client please?
Thanks.
Yes, it is the same for all clients.
Most helpful comment
Yes, it is the same for all clients.