Represents the client that creates server connection by using the host credentials. More...
Inherits IDisposable.
Inherited by Aspose::Email::Clients::Imap::ImapClient, Aspose::Email::Clients::Pop3::Pop3Client, and Aspose::Email::Clients::Smtp::SmtpClient.
Public Member Functions | |
bool | get_EnableLogger () |
Gets value which allows enable/disable logger More... | |
void | set_EnableLogger (bool value) |
Sets value which allows enable/disable logger More... | |
System::String | get_LogFileName () |
Gets log file name More... | |
void | set_LogFileName (System::String value) |
Sets log file name More... | |
bool | get_UseDateInLogFileName () const |
Gets value which indicates if date has to be used in log file name. More... | |
void | set_UseDateInLogFileName (bool value) |
Sets value which indicates if date has to be used in log file name. More... | |
virtual System::SharedPtr< Aspose::Email::Tools::Logging::Logger > | get_Logger () |
virtual void | set_Logger (System::SharedPtr< Aspose::Email::Tools::Logging::Logger > value) |
virtual System::SharedPtr< System::Text::Encoding > | get_DefaultEncoding () |
Gets default encoding for email client More... | |
virtual void | set_DefaultEncoding (System::SharedPtr< System::Text::Encoding > value) |
Sets default encoding for email client More... | |
virtual Base::EncryptionProtocols | get_SupportedEncryption () |
Defines the versions of SSL/TLS encryption protocols to be used. PLEASE PAY YOUR ATTENTION, you may set only those versions of protocol, which are supported by .net framework. IF SOME VERSIONS OF PROTOCOL ARE NOT SUPPORTED BY YOUR CURRENT VERSION OF .NET FRAMEWORK, THEY WILL BE IGNORED AND SKIPPED. IT MAY LEAD TO DOWNGRADE TLS SECURITY LEVEL. IN THIS CASE EXCEPTION WON'T BE GENERATED!!! Please, see EncryptionProtocols documentation for more details. Please use SetSupportedEncryptionUnsafe method if you want to set the encryption protocols without any compatibility checks. Default value is: Tls | Tls11 | Tls12 | Tls13 (in case if your current version of .net framework supports these versions of TLS) More... | |
virtual void | set_SupportedEncryption (Base::EncryptionProtocols value) |
Defines the versions of SSL/TLS encryption protocols to be used. PLEASE PAY YOUR ATTENTION, you may set only those versions of protocol, which are supported by .net framework. IF SOME VERSIONS OF PROTOCOL ARE NOT SUPPORTED BY YOUR CURRENT VERSION OF .NET FRAMEWORK, THEY WILL BE IGNORED AND SKIPPED. IT MAY LEAD TO DOWNGRADE TLS SECURITY LEVEL. IN THIS CASE EXCEPTION WON'T BE GENERATED!!! Please, see EncryptionProtocols documentation for more details. Please use SetSupportedEncryptionUnsafe method if you want to set the encryption protocols without any compatibility checks. Default value is: Tls | Tls11 | Tls12 | Tls13 (in case if your current version of .net framework supports these versions of TLS) More... | |
virtual System::SharedPtr< System::Security::Cryptography::X509Certificates::X509CertificateCollection > | get_ClientCertificates () |
Contains collection of clients certificates More... | |
virtual System::SharedPtr< PipeliningStatus > | get_UsePipelining () |
Gets object which indicates whether the pipelining mode is enabled. More... | |
virtual void | set_UsePipelining (System::SharedPtr< PipeliningStatus > value) |
Sets object which indicates whether the pipelining mode is enabled. More... | |
virtual System::String | get_Host () |
Gets the host name. More... | |
virtual void | set_Host (System::String value) |
Sets the host name. More... | |
virtual int32_t | get_DefaultPort () |
Gets default port for client More... | |
virtual int32_t | get_Port () |
Gets the port. More... | |
virtual void | set_Port (int32_t value) |
Sets the port. More... | |
virtual Aspose::Email::Clients::SecurityOptions | get_SecurityOptions () |
Security mode for a mail client More... | |
virtual void | set_SecurityOptions (Aspose::Email::Clients::SecurityOptions value) |
Security mode for a mail client More... | |
virtual bool | get_UseAuthentication () |
Indicates whether authentication is used. More... | |
virtual void | set_UseAuthentication (bool value) |
Indicates whether authentication is used. More... | |
virtual int32_t | get_ConnectionCheckupPeriod () |
Period of connection checking up in milliseconds. Default value is 5 min. More... | |
virtual void | set_ConnectionCheckupPeriod (int32_t value) |
Period of connection checking up in milliseconds. Default value is 5 min. More... | |
virtual bool | get_UseDefaultCredentials () |
Gets a Boolean value that controls whether the DefaultCredentials are sent with requests. This option is used with NTLM authentication ONLY! More... | |
virtual void | set_UseDefaultCredentials (bool value) |
Sets a Boolean value that controls whether the DefaultCredentials are sent with requests. This option is used with NTLM authentication ONLY! More... | |
virtual System::SharedPtr< Aspose::Email::Clients::Proxy > | get_Proxy () |
Gets proxy for the client More... | |
virtual void | set_Proxy (System::SharedPtr< Aspose::Email::Clients::Proxy > value) |
Sets proxy for the client More... | |
int32_t | get_Timeout () |
Gets the timeout for mail operations More... | |
void | set_Timeout (int32_t value) |
Sets the timeout for mail operations More... | |
int32_t | get_GreetingTimeout () |
Gets the greeting timeout that is used when establishing a connection. Please note, greeting timeout can't be infinite. More... | |
void | set_GreetingTimeout (int32_t value) |
Sets the greeting timeout that is used when establishing a connection. Please note, greeting timeout can't be infinite. More... | |
System::SharedPtr< System::Net::ICredentialsByHost > | get_Credentials () |
void | set_Credentials (System::SharedPtr< System::Net::ICredentialsByHost > value) |
virtual System::String | get_Password () |
Gets the password. Password limitations are defined by server implementation, which client connects. More... | |
virtual void | set_Password (System::String value) |
Sets the password. Password limitations are defined by server implementation, which client connects. More... | |
virtual System::String | get_AccessToken () |
Gets the access token. More... | |
virtual void | set_AccessToken (System::String value) |
Sets the access token. More... | |
System::SharedPtr< ITokenProvider > | get_TokenProvider () const |
Gets TokenProvider allowing to retrieve access token. More... | |
void | set_TokenProvider (System::SharedPtr< ITokenProvider > value) |
Sets TokenProvider allowing to retrieve access token. More... | |
virtual System::String | get_Username () |
Gets the username. More... | |
virtual void | set_Username (System::String value) |
Sets the username. More... | |
Aspose::Email::Clients::ConnectionState | get_ConnectionState () |
Gets the current state of the connection. More... | |
System::SharedPtr< Aspose::Email::Clients::ConnectionPool > | get_ConnectionPool () const |
Gets connection pool for the client More... | |
void | set_ConnectionPool (System::SharedPtr< Aspose::Email::Clients::ConnectionPool > value) |
Sets connection pool for the client More... | |
virtual System::SharedPtr< IConnection > | get_CurrentConnection () |
Gets current connection according to ConnectionAsgmtMode option More... | |
virtual ConnectionAsgmtType | get_ConnectionAsgmtMode () |
Gets value which defines mode of connection allocation in multiple threads environment More... | |
virtual void | set_ConnectionAsgmtMode (ConnectionAsgmtType value) |
Sets value which defines mode of connection allocation in multiple threads environment More... | |
virtual MultiConnectionMode | get_UseMultiConnection () |
Gets value which indicates if client has to use multiple connections for heavy loaded operations. Please note, using of this mode not necessary has to lead to performance increasing. More... | |
virtual void | set_UseMultiConnection (MultiConnectionMode value) |
Sets value which indicates if client has to use multiple connections for heavy loaded operations. Please note, using of this mode not necessary has to lead to performance increasing. More... | |
virtual int32_t | get_ConnectionsQuantity () |
Gets quantity of connections in multy-connection mode More... | |
virtual void | set_ConnectionsQuantity (int32_t value) |
Sets quantity of connections in multy-connection mode More... | |
void | InitializeConnectionPool () |
void | ResetLogSettings () |
Resets logging settings to default. More... | |
void | initializeLogger () |
void | SetSupportedEncryptionUnsafe (Base::EncryptionProtocols value) |
Defines the versions of SSL/TLS encryption protocols to be used. This method is not safe and sets the encryption protocols without any compatibility checks. Use SupportedEncryption property to safely set only protocols that definitely supported by .net framework. Please note, if your current .net framework does not support this level of security, an exception will be thrown when trying to establish a connection to the server. More... | |
void | SetCredentials () |
virtual System::ArrayPtr< System::String > | GetCapabilities () |
void | CancelAsyncOperation (System::SharedPtr< System::IAsyncResult > asyncResult) |
Cancels asynchronous operation. This method is used only with APM operations also known as Begin/End methods. Please do not use this method with TAP operations! More... | |
virtual void | Noop ()=0 |
'No operation' command More... | |
virtual bool | ValidateCredentials ()=0 |
Checks if the credentials are valid More... | |
virtual void | Noop (System::SharedPtr< IConnection > connection)=0 |
'No operation' command More... | |
virtual void | Noop (System::SharedPtr< Connection > connection, int32_t timeout)=0 |
'No operation' command More... | |
virtual void | ConnectionFinalize (System::SharedPtr< System::Object > sender, System::SharedPtr< Base::ConnectionEventArgs > args) |
Performs finalization operation for specified connection More... | |
System::SharedPtr< System::Object > | EndGroupOperation (System::SharedPtr< System::IAsyncResult > asyncResult) |
Waits for the pending asynchronous operation to complete. More... | |
void | Dispose () override |
Finalizes all operations with a server. More... | |
virtual System::SharedPtr< IConnection > | CreateConnection () |
Creates new independent connection for operations not linked to threads (not default connection). Invocation of this method is similar to invocation of CreateConnection(createAsDefaultConnection = false) Please see more in documentation for EmailClient.ConnectionAsgmtMode property. More... | |
virtual System::SharedPtr< IConnection > | CreateConnection (bool createAsDefaultConnection) |
Creates new (default or independent) connection for operations. Please see more in documentation for EmailClient.ConnectionAsgmtMode property. More... | |
Public Attributes | |
System::SharedPtr< System::Object > | loggerSyncObj |
System::SharedPtr< Aspose::Email::Tools::Logging::Logger > | logger |
System::String | password |
System::String | username |
System::String | accessToken |
System::SharedPtr< ITokenProvider > | tokenProvider |
System::SharedPtr< Aspose::Email::Clients::ConnectionPool > | connectionPool |
System::String | clientType |
Static Public Attributes | |
static System::SharedPtr< System::Object > | logManagerSyncObj |
Protected Member Functions | |
EmailClient (System::String type) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port, Aspose::Email::Clients::SecurityOptions securityOptions) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port, System::String username, System::String password) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port, System::String username, System::String password, Aspose::Email::Clients::SecurityOptions securityOptions) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port, System::String username, System::String authInfo, bool useOAuth) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port, System::String username, System::String authInfo, bool useOAuth, Aspose::Email::Clients::SecurityOptions securityOptions) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port, System::String username, System::SharedPtr< ITokenProvider > tokenProvider) | |
Initializes a new instance of the EmailClient class. More... | |
EmailClient (System::String type, System::String host, int32_t port, System::String username, System::SharedPtr< ITokenProvider > tokenProvider, Aspose::Email::Clients::SecurityOptions securityOptions) | |
Initializes a new instance of the EmailClient class. More... | |
virtual void | Dispose (bool disposing) |
Finalizes all operations with a server. More... | |
virtual | ~EmailClient () |
Represents the client that creates server connection by using the host credentials.
|
protected |
Initializes a new instance of the EmailClient class.
|
protected |
Initializes a new instance of the EmailClient class.
host | The host name. |
port | The port number. |
|
protected |
Initializes a new instance of the EmailClient class.
host | The host name. |
port | The port number. |
securityOptions | Security mode for a mail client |
|
protected |
Initializes a new instance of the EmailClient class.
host | The host name. |
port | The port number. |
username | The username. |
password | The account password. Password limitations are defined by server implementation, which the client connects. |
|
protected |
Initializes a new instance of the EmailClient class.
host | The host name. |
port | The port number. |
username | The username. |
password | The account password. Password limitations are defined by server implementation, which the client connects. |
securityOptions | Security mode for a mail client |
|
protected |
Initializes a new instance of the EmailClient class.
host | The host. |
port | The port. |
username | The username. |
authInfo | A string representation of the user password or the access token. AuthInfo limitations are defined by server implementation, which the client connects. |
useOAuth | Defines whether OAuth is used to login to the server |
|
protected |
Initializes a new instance of the EmailClient class.
host | The host. |
port | The port. |
username | The username. |
authInfo | A string representation of the user password or the access token. |
useOAuth | Defines whether OAuth is used to login to the server |
securityOptions | Security mode for a mail client |
|
protected |
Initializes a new instance of the EmailClient class.
host | The host. |
port | The port. |
username | The username. |
tokenProvider | TokenProvider allowing to retrieve access token. |
|
protected |
Initializes a new instance of the EmailClient class.
host | The host. |
port | The port. |
username | The username. |
tokenProvider | TokenProvider allowing to retrieve access token. |
securityOptions |
|
protectedvirtual |
void Aspose::Email::Clients::EmailClient::CancelAsyncOperation | ( | System::SharedPtr< System::IAsyncResult > | asyncResult | ) |
Cancels asynchronous operation. This method is used only with APM operations also known as Begin/End methods. Please do not use this method with TAP operations!
asyncResult | Defines asynchronous operation to cancel. |
|
virtual |
Performs finalization operation for specified connection
sender | The source of the event. |
args | An ConnectionManagerEventArgs that contains the event data. |
|
virtual |
Creates new independent connection for operations not linked to threads (not default connection). Invocation of this method is similar to invocation of CreateConnection(createAsDefaultConnection = false) Please see more in documentation for EmailClient.ConnectionAsgmtMode property.
|
virtual |
Creates new (default or independent) connection for operations. Please see more in documentation for EmailClient.ConnectionAsgmtMode property.
createAsDefaultConnection | Indicates if connection has to be created as default for current thread |
|
override |
Finalizes all operations with a server.
|
protectedvirtual |
Finalizes all operations with a server.
disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
System::SharedPtr<System::Object> Aspose::Email::Clients::EmailClient::EndGroupOperation | ( | System::SharedPtr< System::IAsyncResult > | asyncResult | ) |
Waits for the pending asynchronous operation to complete.
asyncResult | The reference to the pending asynchronous request to wait for. |
|
virtual |
Gets the access token.
The string that represents access token.
|
virtual |
Contains collection of clients certificates
|
virtual |
Gets value which defines mode of connection allocation in multiple threads environment
There are folowing connection types:
There are folowing connection allocation types:
This mode uses by default in email clients. Email client uses main connection for all operations from multiple threads if default connection hasn't been created, or connection hasnt been passed as method parameter explicitly. Main connection is connection which is created in the same time like email client. User can create default connections for threads with CreateConnection method. If default connection for thread is created, it's used implicitly for all methods of email client which are invoked in this thread. If default connection for thread is not created, main connection is used for all methods of email client which are invoked in this thread. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection (if he uses it) in the end of the code which executes in the thread.
Email client uses main connection for all operations from multiple threads. Main connection is connection which is created in the same time like email client. User cann't create default connections. User can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections.
Email client uses implicitly only default connections for all operations from multiple threads. Main connection is not used in this mode. If default connection hasn't been created for some thread (first invocation of email client method), email client creates default connection implicitly for thread before first operation is executed. User can't create default connections for threads with CreateConnection method because they are created automatically. When default connection for thread is created, it's used implicitly for all methods of email client which are invoked in this thread.read. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection in the end of the code which executes in the thread.
|
virtual |
Period of connection checking up in milliseconds. Default value is 5 min.
System::SharedPtr<Aspose::Email::Clients::ConnectionPool> Aspose::Email::Clients::EmailClient::get_ConnectionPool | ( | ) | const |
Gets connection pool for the client
|
virtual |
Gets quantity of connections in multy-connection mode
Aspose::Email::Clients::ConnectionState Aspose::Email::Clients::EmailClient::get_ConnectionState | ( | ) |
Gets the current state of the connection.
System::SharedPtr<System::Net::ICredentialsByHost> Aspose::Email::Clients::EmailClient::get_Credentials | ( | ) |
|
virtual |
Gets current connection according to ConnectionAsgmtMode option
|
virtual |
Gets default encoding for email client
|
virtual |
Gets default port for client
Reimplemented in Aspose::Email::Clients::Smtp::SmtpClient, Aspose::Email::Clients::Pop3::Pop3Client, and Aspose::Email::Clients::Imap::ImapClient.
bool Aspose::Email::Clients::EmailClient::get_EnableLogger | ( | ) |
Gets value which allows enable/disable logger
int32_t Aspose::Email::Clients::EmailClient::get_GreetingTimeout | ( | ) |
Gets the greeting timeout that is used when establishing a connection. Please note, greeting timeout can't be infinite.
Email clients may execute enough long operations. To limit the time of operations users have to use EmailClient::Timeout property. Values for this property have to have long intervals to not prevent long-time operations. But in some cases, if EmailClient will use only Timeout property connection establishing may take a long time. For instance, the mail client may use the automatic mode to connection establishing. In this mode, the email client goes through all possible connection parameters until the connection is established. SMTP, IMAP, and POP3 servers in case of correct connection establishing send greeting string to the client. Servers may use implicit or explicit (START TLS) SSL/TLS connection initiation. If connection mode is mismatched (for instance, the server waits for an implicit SSL connection but the client tries to establish a non-secured or explicit SSL connection), the server won't send a greeting string. In this case, the user will wait a long time until the timeout reaches a greeting string, and the client goes to the next connection option. To avoid this problem, the GreetingTimeout property has been introduced. This property allows you to set the timeout for greeting string, and reduce the time of automatic connection establishment.
The greeting timeout in milliseconds
|
virtual |
Gets the host name.
The host name.
System::String Aspose::Email::Clients::EmailClient::get_LogFileName | ( | ) |
Gets log file name
|
virtual |
|
virtual |
Gets the password. Password limitations are defined by server implementation, which client connects.
The string that represents the password.
|
virtual |
Gets the port.
The port number.
|
virtual |
Gets proxy for the client
|
virtual |
Security mode for a mail client
|
virtual |
Defines the versions of SSL/TLS encryption protocols to be used. PLEASE PAY YOUR ATTENTION, you may set only those versions of protocol, which are supported by .net framework. IF SOME VERSIONS OF PROTOCOL ARE NOT SUPPORTED BY YOUR CURRENT VERSION OF .NET FRAMEWORK, THEY WILL BE IGNORED AND SKIPPED. IT MAY LEAD TO DOWNGRADE TLS SECURITY LEVEL. IN THIS CASE EXCEPTION WON'T BE GENERATED!!! Please, see EncryptionProtocols documentation for more details. Please use SetSupportedEncryptionUnsafe method if you want to set the encryption protocols without any compatibility checks. Default value is: Tls | Tls11 | Tls12 | Tls13 (in case if your current version of .net framework supports these versions of TLS)
int32_t Aspose::Email::Clients::EmailClient::get_Timeout | ( | ) |
Gets the timeout for mail operations
The timeout in milliseconds
System::SharedPtr<ITokenProvider> Aspose::Email::Clients::EmailClient::get_TokenProvider | ( | ) | const |
Gets TokenProvider allowing to retrieve access token.
|
virtual |
Indicates whether authentication is used.
bool Aspose::Email::Clients::EmailClient::get_UseDateInLogFileName | ( | ) | const |
Gets value which indicates if date has to be used in log file name.
|
virtual |
Gets a Boolean value that controls whether the DefaultCredentials are sent with requests. This option is used with NTLM authentication ONLY!
Reimplemented in Aspose::Email::Clients::Smtp::SmtpClient.
|
virtual |
Gets value which indicates if client has to use multiple connections for heavy loaded operations. Please note, using of this mode not necessary has to lead to performance increasing.
|
virtual |
Gets object which indicates whether the pipelining mode is enabled.
|
virtual |
Gets the username.
The username string.
|
virtual |
void Aspose::Email::Clients::EmailClient::InitializeConnectionPool | ( | ) |
void Aspose::Email::Clients::EmailClient::initializeLogger | ( | ) |
|
pure virtual |
'No operation' command
Implemented in Aspose::Email::Clients::Smtp::SmtpClient, Aspose::Email::Clients::Pop3::Pop3Client, and Aspose::Email::Clients::Imap::ImapClient.
|
pure virtual |
'No operation' command
connection | Connection to a server |
timeout | timeout of a command |
Implemented in Aspose::Email::Clients::Smtp::SmtpClient, Aspose::Email::Clients::Pop3::Pop3Client, and Aspose::Email::Clients::Imap::ImapClient.
|
pure virtual |
'No operation' command
connection | Connection to a server |
Implemented in Aspose::Email::Clients::Smtp::SmtpClient, Aspose::Email::Clients::Pop3::Pop3Client, and Aspose::Email::Clients::Imap::ImapClient.
void Aspose::Email::Clients::EmailClient::ResetLogSettings | ( | ) |
Resets logging settings to default.
|
virtual |
Sets the access token.
The string that represents access token.
|
virtual |
Sets value which defines mode of connection allocation in multiple threads environment
There are folowing connection types:
There are folowing connection allocation types:
This mode uses by default in email clients. Email client uses main connection for all operations from multiple threads if default connection hasn't been created, or connection hasnt been passed as method parameter explicitly. Main connection is connection which is created in the same time like email client. User can create default connections for threads with CreateConnection method. If default connection for thread is created, it's used implicitly for all methods of email client which are invoked in this thread. If default connection for thread is not created, main connection is used for all methods of email client which are invoked in this thread. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection (if he uses it) in the end of the code which executes in the thread.
Email client uses main connection for all operations from multiple threads. Main connection is connection which is created in the same time like email client. User cann't create default connections. User can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections.
Email client uses implicitly only default connections for all operations from multiple threads. Main connection is not used in this mode. If default connection hasn't been created for some thread (first invocation of email client method), email client creates default connection implicitly for thread before first operation is executed. User can't create default connections for threads with CreateConnection method because they are created automatically. When default connection for thread is created, it's used implicitly for all methods of email client which are invoked in this thread.read. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection in the end of the code which executes in the thread.
|
virtual |
Period of connection checking up in milliseconds. Default value is 5 min.
void Aspose::Email::Clients::EmailClient::set_ConnectionPool | ( | System::SharedPtr< Aspose::Email::Clients::ConnectionPool > | value | ) |
Sets connection pool for the client
|
virtual |
Sets quantity of connections in multy-connection mode
void Aspose::Email::Clients::EmailClient::set_Credentials | ( | System::SharedPtr< System::Net::ICredentialsByHost > | value | ) |
|
virtual |
Sets default encoding for email client
void Aspose::Email::Clients::EmailClient::set_EnableLogger | ( | bool | value | ) |
Sets value which allows enable/disable logger
void Aspose::Email::Clients::EmailClient::set_GreetingTimeout | ( | int32_t | value | ) |
Sets the greeting timeout that is used when establishing a connection. Please note, greeting timeout can't be infinite.
Email clients may execute enough long operations. To limit the time of operations users have to use EmailClient::Timeout property. Values for this property have to have long intervals to not prevent long-time operations. But in some cases, if EmailClient will use only Timeout property connection establishing may take a long time. For instance, the mail client may use the automatic mode to connection establishing. In this mode, the email client goes through all possible connection parameters until the connection is established. SMTP, IMAP, and POP3 servers in case of correct connection establishing send greeting string to the client. Servers may use implicit or explicit (START TLS) SSL/TLS connection initiation. If connection mode is mismatched (for instance, the server waits for an implicit SSL connection but the client tries to establish a non-secured or explicit SSL connection), the server won't send a greeting string. In this case, the user will wait a long time until the timeout reaches a greeting string, and the client goes to the next connection option. To avoid this problem, the GreetingTimeout property has been introduced. This property allows you to set the timeout for greeting string, and reduce the time of automatic connection establishment.
The greeting timeout in milliseconds
|
virtual |
Sets the host name.
The host name.
void Aspose::Email::Clients::EmailClient::set_LogFileName | ( | System::String | value | ) |
Sets log file name
|
virtual |
|
virtual |
Sets the password. Password limitations are defined by server implementation, which client connects.
The string that represents the password.
|
virtual |
Sets the port.
The port number.
|
virtual |
Sets proxy for the client
|
virtual |
Security mode for a mail client
|
virtual |
Defines the versions of SSL/TLS encryption protocols to be used. PLEASE PAY YOUR ATTENTION, you may set only those versions of protocol, which are supported by .net framework. IF SOME VERSIONS OF PROTOCOL ARE NOT SUPPORTED BY YOUR CURRENT VERSION OF .NET FRAMEWORK, THEY WILL BE IGNORED AND SKIPPED. IT MAY LEAD TO DOWNGRADE TLS SECURITY LEVEL. IN THIS CASE EXCEPTION WON'T BE GENERATED!!! Please, see EncryptionProtocols documentation for more details. Please use SetSupportedEncryptionUnsafe method if you want to set the encryption protocols without any compatibility checks. Default value is: Tls | Tls11 | Tls12 | Tls13 (in case if your current version of .net framework supports these versions of TLS)
void Aspose::Email::Clients::EmailClient::set_Timeout | ( | int32_t | value | ) |
Sets the timeout for mail operations
The timeout in milliseconds
void Aspose::Email::Clients::EmailClient::set_TokenProvider | ( | System::SharedPtr< ITokenProvider > | value | ) |
Sets TokenProvider allowing to retrieve access token.
|
virtual |
Indicates whether authentication is used.
void Aspose::Email::Clients::EmailClient::set_UseDateInLogFileName | ( | bool | value | ) |
Sets value which indicates if date has to be used in log file name.
|
virtual |
Sets a Boolean value that controls whether the DefaultCredentials are sent with requests. This option is used with NTLM authentication ONLY!
Reimplemented in Aspose::Email::Clients::Smtp::SmtpClient.
|
virtual |
Sets value which indicates if client has to use multiple connections for heavy loaded operations. Please note, using of this mode not necessary has to lead to performance increasing.
|
virtual |
Sets object which indicates whether the pipelining mode is enabled.
|
virtual |
Sets the username.
The username string.
void Aspose::Email::Clients::EmailClient::SetCredentials | ( | ) |
void Aspose::Email::Clients::EmailClient::SetSupportedEncryptionUnsafe | ( | Base::EncryptionProtocols | value | ) |
Defines the versions of SSL/TLS encryption protocols to be used. This method is not safe and sets the encryption protocols without any compatibility checks. Use SupportedEncryption property to safely set only protocols that definitely supported by .net framework. Please note, if your current .net framework does not support this level of security, an exception will be thrown when trying to establish a connection to the server.
|
pure virtual |
Checks if the credentials are valid
Implemented in Aspose::Email::Clients::Smtp::SmtpClient, Aspose::Email::Clients::Pop3::Pop3Client, and Aspose::Email::Clients::Imap::ImapClient.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
System::String Aspose::Email::Clients::EmailClient::accessToken |
System::String Aspose::Email::Clients::EmailClient::clientType |
System::SharedPtr<Aspose::Email::Clients::ConnectionPool> Aspose::Email::Clients::EmailClient::connectionPool |
System::SharedPtr<Aspose::Email::Tools::Logging::Logger> Aspose::Email::Clients::EmailClient::logger |
System::SharedPtr<System::Object> Aspose::Email::Clients::EmailClient::loggerSyncObj |
|
static |
System::String Aspose::Email::Clients::EmailClient::password |
System::SharedPtr<ITokenProvider> Aspose::Email::Clients::EmailClient::tokenProvider |
System::String Aspose::Email::Clients::EmailClient::username |