![]() | Proxy |
public abstract class ProxyClient : IProxyClient
The ProxyClient type exposes the following members.
Name | Description | |
---|---|---|
![]() | ProxyClient(String, Int32) | Initializes a new instance of the ProxyClient class. |
![]() | ProxyClient(String, Int32, NetworkCredential) | Initializes a new instance of the ProxyClient class. |
Name | Description | |
---|---|---|
![]() | LocalEndPoint | Get or set the local IP end point to use when connecting to a remote host. |
![]() | ProxyCredentials | Gets the proxy credentials. |
![]() | ProxyHost | Get the proxy host. |
![]() | ProxyPort | Get the proxy port. |
Name | Description | |
---|---|---|
![]() | Connect(String, Int32, CancellationToken) | Connect to the target host. |
![]() | Connect(String, Int32, Int32, CancellationToken) | Connect to the target host. |
![]() | ConnectAsync(String, Int32, CancellationToken) | Asynchronously connect to the target host. |
![]() | ConnectAsync(String, Int32, Int32, CancellationToken) | Asynchronously connect to the target host. |
![]() | Equals | (Inherited from Object) |
![]() | Finalize | (Inherited from Object) |
![]() | GetHashCode | (Inherited from Object) |
![]() | GetType | (Inherited from Object) |
![]() | MemberwiseClone | (Inherited from Object) |
![]() | ToString | (Inherited from Object) |
public static void SendMessageViaProxy (MimeMessage message) { using (var client = new SmtpClient ()) { client.ProxyClient = new Socks5Proxy ("socks5.proxy.com", 1080, new NetworkCredentials ("proxyUserName", "proxyPassword")); client.Connect ("smtp.gmail.com", 465, SecureSocketOptions.SslOnConnect); client.Authenticate ("username", "password"); client.Send (message); client.Disconnect (true); } }