|  | IMailServiceProxyClient Property | 
            Get or set the proxy client to use when connecting to a remote host.
            
Namespace: MailKitAssembly: MailKit (in MailKit.dll) Version: 4.12.1
 Syntax
SyntaxIProxyClient ProxyClient { get; set; }Property Value
IProxyClientThe proxy client.
 Remarks
Remarks
            Gets or sets the proxy client to use when connecting to a remote host via any of the
            
Connect methods.
            
 Example
Examplepublic 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);
    }
} See Also
See Also