Aspose::Email::Tools::Verifications::EmailValidator Class Referencefinal

EmailValidator class provides the capability to validate e-mail addresses. More...

Inherits Object.

Public Member Functions

System::ArrayPtr< System::String > get_DnsServers () const
 Gets the Dns server list to use in the email validation. More...
 
void set_DnsServers (System::ArrayPtr< System::String > value)
 Sets the Dns server list to use in the email validation. More...
 
int32_t get_Timeout () const
 Gets the length of time (in milliseconds) until the request times out. More...
 
void set_Timeout (int32_t value)
 Sets the length of time (in milliseconds) until the request times out. More...
 
 EmailValidator ()
 Create an instance of EmailValidator. More...
 
void Validate (System::String mailAddress, ValidationPolicy policy, System::SharedPtr< ValidationResult > &result)
 Validating the email address More...
 
void Validate (System::String mailAddress, System::SharedPtr< ValidationResult > &result)
 Validate email address, with the MailServer validation policy. More...
 

Public Attributes

System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< SyntaxValidatingEventArgs >)> SyntaxValidating
 This event occurs when validating the syntax of an email addresss. More...
 
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< DomainValidatingEventArgs >)> DomainValidating
 This event occurs when validating the domain of an email addresss. More...
 
System::Event< void(System::SharedPtr< System::Object >, System::SharedPtr< MailServerValidatingEventArgs >)> MailServerValidating
 This event occurs when validating an email addresss on its mail server. More...
 

Protected Member Functions

virtual ~EmailValidator ()
 

Detailed Description

EmailValidator class provides the capability to validate e-mail addresses.

Constructor & Destructor Documentation

◆ EmailValidator()

Aspose::Email::Tools::Verifications::EmailValidator::EmailValidator ( )

Create an instance of EmailValidator.

◆ ~EmailValidator()

virtual Aspose::Email::Tools::Verifications::EmailValidator::~EmailValidator ( )
protectedvirtual

Member Function Documentation

◆ get_DnsServers()

System::ArrayPtr<System::String> Aspose::Email::Tools::Verifications::EmailValidator::get_DnsServers ( ) const

Gets the Dns server list to use in the email validation.

◆ get_Timeout()

int32_t Aspose::Email::Tools::Verifications::EmailValidator::get_Timeout ( ) const

Gets the length of time (in milliseconds) until the request times out.

◆ set_DnsServers()

void Aspose::Email::Tools::Verifications::EmailValidator::set_DnsServers ( System::ArrayPtr< System::String >  value)

Sets the Dns server list to use in the email validation.

◆ set_Timeout()

void Aspose::Email::Tools::Verifications::EmailValidator::set_Timeout ( int32_t  value)

Sets the length of time (in milliseconds) until the request times out.

◆ Validate() [1/2]

void Aspose::Email::Tools::Verifications::EmailValidator::Validate ( System::String  mailAddress,
System::SharedPtr< ValidationResult > &  result 
)

Validate email address, with the MailServer validation policy.

Parameters
mailAddressThe Email address to be validated.
resultThe result of the validation.

◆ Validate() [2/2]

void Aspose::Email::Tools::Verifications::EmailValidator::Validate ( System::String  mailAddress,
ValidationPolicy  policy,
System::SharedPtr< ValidationResult > &  result 
)

Validating the email address

Parameters
mailAddressThe mail address to be validated.
policyThe policy of the validating process.
resultThe result of the validating process.

Member Data Documentation

◆ DomainValidating

System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<DomainValidatingEventArgs>)> Aspose::Email::Tools::Verifications::EmailValidator::DomainValidating

This event occurs when validating the domain of an email addresss.

◆ MailServerValidating

System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<MailServerValidatingEventArgs>)> Aspose::Email::Tools::Verifications::EmailValidator::MailServerValidating

This event occurs when validating an email addresss on its mail server.

◆ SyntaxValidating

System::Event<void(System::SharedPtr<System::Object>, System::SharedPtr<SyntaxValidatingEventArgs>)> Aspose::Email::Tools::Verifications::EmailValidator::SyntaxValidating

This event occurs when validating the syntax of an email addresss.