NET Email Validation
Proxy Property
Example 






KellermanSoftware.NetEmailValidation Namespace > EmailValidation Class : Proxy Property
Set the Socks 4 or 5 Proxy. Defaults to None
Syntax
'Declaration
 
Public Overridable Property Proxy As ProxyInfo
'Usage
 
Dim instance As EmailValidation
Dim value As ProxyInfo
 
instance.Proxy = value
 
value = instance.Proxy
public virtual ProxyInfo Proxy {get; set;}
public read-write property Proxy: ProxyInfo; virtual; 
public function get,set Proxy : ProxyInfo
public: __property virtual ProxyInfo* get_Proxy();
public: __property virtual void set_Proxy( 
   ProxyInfo* value
);
public:
virtual property ProxyInfo^ Proxy {
   ProxyInfo^ get();
   void set (    ProxyInfo^ value);
}
Example
EmailValidation emailValidator = new EmailValidation(); //Trial Mode
//EmailValidation emailValidator = new EmailValidation("place user name here", "place license key here"); //License Mode
 
validation.FromEmail = "someone@somewhere.com";
validation.FromMailServer = "mail.somewhere.com";
 
//Setup Proxy Information
ProxyInfo proxyInfo = new ProxyInfo();
proxyInfo.Port = 1080;
proxyInfo.Type = ProxyType.Socks5;
proxyInfo.UserName = "MyUserName";
proxyInfo.Password = "MyPassword";
proxyInfo.Host = "TheProxyName";
validation.Proxy = proxyInfo;
 
//Validate the email
List<ValidationOptions> options = validation.DefaultOptions;
Result result = validation.ValidEmail("someone@somewhere.com", validation.DefaultOptions);
 
Console.WriteLine(result.UserMessage);
 
Console.WriteLine(result.Log);
Dim emailValidator As New EmailValidation() 'Trial Mode
'EmailValidation emailValidator = new EmailValidation("place user name here", "place license key here"); //License Mode
 
validation.FromEmail = "someone@somewhere.com"
validation.FromMailServer = "mail.somewhere.com"
 
'Setup Proxy Information
Dim proxyInfo As New ProxyInfo()
proxyInfo.Port = 1080
proxyInfo.Type = ProxyType.Socks5
proxyInfo.UserName = "MyUserName"
proxyInfo.Password = "MyPassword"
proxyInfo.Host = "TheProxyName"
validation.Proxy = proxyInfo
 
'Validate the email
Dim options As List(Of ValidationOptions) = validation.DefaultOptions
Dim result As Result = validation.ValidEmail("someone@somewhere.com", validation.DefaultOptions)
 
Console.WriteLine(result.UserMessage)
 
Console.WriteLine(result.Log)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EmailValidation Class
EmailValidation Members