Provides access to the settings which allow MailBee to connect to a mail server via a proxy server.
A reference to the proxy server settings.
By default, proxy server is not used. The developer can change this to make MailBee use SOCKS4, SOCKS5, or HTTP proxy server. This is useful when a firewall prohibits direct connections with a mail server but permits connections via a proxy.
This console sample establishes connection with the mail server via an HTTP proxy server which requires clients to authenticate themselves.
[C#] using System; using MailBee; using MailBee.Pop3Mail; using MailBee.Proxy; class Sample { static void Main(string[] args) { Pop3 pop = new Pop3(); pop.Proxy.Name = "proxy.server.com"; pop.Proxy.Protocol = ProxyProtocol.Http; pop.Proxy.Port = 808; pop.Proxy.AccountName = "jdoe"; pop.Proxy.Password = "secret"; pop.Connect("mail.company.com"); Console.WriteLine("Connected via a proxy server"); pop.Disconnect(); } }
[Visual Basic] Imports System Imports MailBee Imports MailBee.Pop3Mail Imports MailBee.Proxy Class Sample Shared Sub Main(ByVal args() As String) Dim pop As New Pop3 pop.Proxy.Name = "proxy.server.com" pop.Proxy.Protocol = ProxyProtocol.Http pop.Proxy.Port = 808 pop.Proxy.AccountName = "jdoe" pop.Proxy.Password = "secret" pop.Connect("mail.company.com") Console.WriteLine("Connected via a proxy server") pop.Disconnect() End Sub End Class
Pop3 Class | MailBee.Pop3Mail Namespace | ProxyServer