NET Email Validation
TotalEmailsToProcess Property (EmailValidation)
Example 






KellermanSoftware.NetEmailValidation Namespace > EmailValidation Class : TotalEmailsToProcess Property
The total number of emails to validate
Syntax
'Declaration
 
Public ReadOnly Property TotalEmailsToProcess As System.Integer
'Usage
 
Dim instance As EmailValidation
Dim value As System.Integer
 
value = instance.TotalEmailsToProcess
public System.int TotalEmailsToProcess {get;}
public read-only property TotalEmailsToProcess: System.Integer; 
public function get TotalEmailsToProcess : System.int
public: __property System.int get_TotalEmailsToProcess();
public:
property System.int TotalEmailsToProcess {
   System.int get();
}
Example
EmailValidation emailValidator = new EmailValidation(); //Trial Mode
//EmailValidation emailValidator = new EmailValidation("place user name here", "place license key here"); //License Mode
     
emailValidator.FromEmail = "someone@somewhere.com";
emailValidator.FromMailServer = "mail.somewhere.com";
 
//Create a list of 100 email addresses
List<string> emailAddresses = new List<string>();
 
for (int i = 1; i <= 100; i++)
    emailAddresses.Add(string.Format("johnsmith{0}@hotmail.com", i));
 
//Begin asynchronous validation
emailValidator.ValidateListAsync(emailAddresses);
 
while (emailValidator.IsBusy)
{
    Console.WriteLine(string.Format("{0} of {1}", 
        emailValidator.EmailsProcessed, 
        emailValidator.TotalEmailsToProcess));
 
    //Sleep 1 second
    System.Threading.Thread.Sleep(1000);
}
Dim emailValidator As EmailValidation = New EmailValidation() 'Trial Mode
'Dim emailValidator As EmailValidation = New EmailValidation("place user name here", "place license key here") 'License Mode
 
emailValidator.FromEmail = "someone@somewhere.com"
emailValidator.FromMailServer = "mail.somewhere.com"
 
'Create a list of 100 email addresses
Dim emailAddresses As List(Of String) = New List(Of String)()
 
For i As Integer = 1 To 100
    emailAddresses.Add(String.Format("johnsmith{0}@hotmail.com", i))
Next i
 
'Begin asynchronous validation
emailValidator.ValidateListAsync(emailAddresses)
 
Do While emailValidator.IsBusy
    Console.WriteLine(String.Format("{0} of {1}", emailValidator.EmailsProcessed, emailValidator.TotalEmailsToProcess))
 
    'Sleep 1 second
    System.Threading.Thread.Sleep(1000)
Loop
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