Represents the client that creates server connection by using the host credentials. More...

Inherits IDisposable.

Inherited by Aspose::Email::Clients::CredentialsByHostClient.

Public Member Functions

ASPOSE_EMAIL_SHARED_API bool get_EnableLogger ()
 Gets value which allows enable/disable logger More...
 
ASPOSE_EMAIL_SHARED_API void set_EnableLogger (bool value)
 Sets value which allows enable/disable logger More...
 
ASPOSE_EMAIL_SHARED_API System::String get_LogFileName () const
 Gets log file name More...
 
ASPOSE_EMAIL_SHARED_API void set_LogFileName (System::String value)
 Sets log file name More...
 
ASPOSE_EMAIL_SHARED_API bool get_UseDateInLogFileName () const
 Gets value which indicates if date has to be used in log file name. More...
 
ASPOSE_EMAIL_SHARED_API void set_UseDateInLogFileName (bool value)
 Sets value which indicates if date has to be used in log file name. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< Aspose::Email::Tools::Logging::Logger > get_Logger ()
 
virtual ASPOSE_EMAIL_SHARED_API void set_Logger (System::SharedPtr< Aspose::Email::Tools::Logging::Logger > value)
 
virtual ASPOSE_EMAIL_SHARED_API Base::EncryptionProtocols get_SupportedEncryption ()
 Defines the versions of SSL/TLS encription protocols to be uised. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_SupportedEncryption (Base::EncryptionProtocols value)
 Defines the versions of SSL/TLS encription protocols to be uised. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::Security::Cryptography::X509Certificates::X509CertificateCollection > get_ClientCertificates ()
 Contains collection of clients certificates More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< PipeliningStatusget_UsePipelining ()
 Gets object which indicates whether the pipelining mode is enabled. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_UsePipelining (System::SharedPtr< PipeliningStatus > value)
 Sets object which indicates whether the pipelining mode is enabled. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::String get_Host ()
 Gets the host name. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_Host (System::String value)
 Sets the host name. More...
 
virtual ASPOSE_EMAIL_SHARED_API int32_t get_DefaultPort ()
 Gets default port for client More...
 
virtual ASPOSE_EMAIL_SHARED_API int32_t get_Port ()
 Gets the port. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_Port (int32_t value)
 Sets the port. More...
 
virtual ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::SecurityOptions get_SecurityOptions ()
 Security mode for a mail client More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_SecurityOptions (Aspose::Email::Clients::SecurityOptions value)
 Security mode for a mail client More...
 
virtual ASPOSE_EMAIL_SHARED_API bool get_UseAuthentication ()
 Indicates whether authentication is used. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_UseAuthentication (bool value)
 Indicates whether authentication is used. More...
 
virtual ASPOSE_EMAIL_SHARED_API int32_t get_ConnectionCheckupPeriod ()
 Period of connection checking up in milliseconds. Default value is 5 min. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_ConnectionCheckupPeriod (int32_t value)
 Period of connection checking up in milliseconds. Default value is 5 min. More...
 
virtual ASPOSE_EMAIL_SHARED_API bool get_UseDefaultCredentials ()
 Gets a Boolean value that controls whether the DefaultCredentials are sent with requests. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_UseDefaultCredentials (bool value)
 Sets a Boolean value that controls whether the DefaultCredentials are sent with requests. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< Aspose::Email::Clients::Proxyget_Proxy ()
 Gets proxy for the client More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_Proxy (System::SharedPtr< Aspose::Email::Clients::Proxy > value)
 Sets proxy for the client More...
 
ASPOSE_EMAIL_SHARED_API int32_t get_Timeout ()
 Gets the timeout for mail operations More...
 
ASPOSE_EMAIL_SHARED_API void set_Timeout (int32_t value)
 Sets the timeout for mail operations More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::Net::ICredentialsByHost > get_Credentials ()
 
ASPOSE_EMAIL_SHARED_API void set_Credentials (System::SharedPtr< System::Net::ICredentialsByHost > value)
 
virtual ASPOSE_EMAIL_SHARED_API System::String get_Password ()
 Gets the password. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_Password (System::String value)
 Sets the password. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::String get_AccessToken ()
 Gets the access token. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_AccessToken (System::String value)
 Sets the access token. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< ITokenProviderget_TokenProvider () const
 Gets TokenProvider allowing to retrieve access token. More...
 
ASPOSE_EMAIL_SHARED_API void set_TokenProvider (System::SharedPtr< ITokenProvider > value)
 Sets TokenProvider allowing to retrieve access token. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::String get_Username ()
 Gets the username. More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_Username (System::String value)
 Sets the username. More...
 
ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::ConnectionState get_ConnectionState ()
 Gets the current state of the connection. More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< Aspose::Email::Clients::ConnectionPool > get_ConnectionPool () const
 Gets connection pool for the client More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< IConnectionget_CurrentConnection ()
 Gets current connection according to ConnectionAsgmtMode option More...
 
virtual ASPOSE_EMAIL_SHARED_API ConnectionAsgmtType get_ConnectionAsgmtMode ()
 Gets value which defines mode of connection allocation in multiple threads environment More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_ConnectionAsgmtMode (ConnectionAsgmtType value)
 Sets value which defines mode of connection allocation in multiple threads environment More...
 
virtual ASPOSE_EMAIL_SHARED_API MultyConnectionMode get_UseMultyConnection ()
 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 ASPOSE_EMAIL_SHARED_API void set_UseMultyConnection (MultyConnectionMode 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 ASPOSE_EMAIL_SHARED_API 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 ASPOSE_EMAIL_SHARED_API 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 ASPOSE_EMAIL_SHARED_API int32_t get_ConnectionsQuantity ()
 Gets quantity of connections in multy-connection mode More...
 
virtual ASPOSE_EMAIL_SHARED_API void set_ConnectionsQuantity (int32_t value)
 Sets quantity of connections in multy-connection mode More...
 
ASPOSE_EMAIL_SHARED_API void InitializeConnectionPool ()
 
ASPOSE_EMAIL_SHARED_API void ResetLogSettings ()
 Resets logging settings to default. More...
 
ASPOSE_EMAIL_SHARED_API void initializeLogger ()
 
virtual ASPOSE_EMAIL_SHARED_API void CheckCredentials ()
 
virtual ASPOSE_EMAIL_SHARED_API System::ArrayPtr< System::String > GetCapabilities ()
 
ASPOSE_EMAIL_SHARED_API void CancelAsyncOperation (System::SharedPtr< System::IAsyncResult > asyncResult)
 Cancels asynchronous operation. More...
 
virtual ASPOSE_EMAIL_SHARED_API void Noop ()=0
 'No operation' command More...
 
virtual ASPOSE_EMAIL_SHARED_API void Noop (System::SharedPtr< IConnection > connection)=0
 'No operation' command More...
 
virtual ASPOSE_EMAIL_SHARED_API void Noop (System::SharedPtr< Connection > connection, int32_t timeout)=0
 'No operation' command More...
 
virtual ASPOSE_EMAIL_SHARED_API void ConnectionFinalize (System::SharedPtr< System::Object > sender, System::SharedPtr< Base::ConnectionEventArgs > args)
 Performs finalization operation for specified connection More...
 
ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::Object > EndGroupOperation (System::SharedPtr< System::IAsyncResult > asyncResult)
 Waits for the pending asynchronous operation to complete. More...
 
virtual ASPOSE_EMAIL_SHARED_API void Dispose ()
 Finalizes all operations with a server. More...
 
virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr< IConnectionCreateConnection ()
 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 ASPOSE_EMAIL_SHARED_API System::SharedPtr< IConnectionCreateConnection (bool createAsDefaultConnection)
 Creates new (default or independent) connection for operations. Please see more in documentation for EmailClient.ConnectionAsgmtMode property. More...
 
virtual ASPOSE_EMAIL_SHARED_API ~EmailClient ()
 

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< ITokenProvidertokenProvider
 
System::SharedPtr< Aspose::Email::Clients::ConnectionPool > connectionPool
 
System::String clientType
 

Static Public Attributes

static ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::Object > logManagerSyncObj
 

Protected Member Functions

ASPOSE_EMAIL_SHARED_API EmailClient (System::String type)
 Initializes a new instance of the EmailClient class. More...
 
ASPOSE_EMAIL_SHARED_API EmailClient (System::String type, System::String host, int32_t port)
 Initializes a new instance of the EmailClient class. More...
 
ASPOSE_EMAIL_SHARED_API EmailClient (System::String type, System::String host, int32_t port, Aspose::Email::Clients::SecurityOptions securityOptions)
 Initializes a new instance of the EmailClient class. More...
 
ASPOSE_EMAIL_SHARED_API 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...
 
ASPOSE_EMAIL_SHARED_API 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...
 
ASPOSE_EMAIL_SHARED_API 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...
 
ASPOSE_EMAIL_SHARED_API 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...
 
ASPOSE_EMAIL_SHARED_API 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...
 
ASPOSE_EMAIL_SHARED_API 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 ASPOSE_EMAIL_SHARED_API void Dispose (bool disposing)
 Finalizes all operations with a server. More...
 

Friends

class Aspose::Email::Clients::CredentialsByHostClient
 
class Aspose::Email::Clients::Base::BaseProtocolCommand
 
class Aspose::Email::Clients::ConnectionPool
 

Detailed Description

Represents the client that creates server connection by using the host credentials.

Constructor & Destructor Documentation

◆ ~EmailClient()

virtual ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::~EmailClient ( )
virtual

◆ EmailClient() [1/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type)
protected

Initializes a new instance of the EmailClient class.

◆ EmailClient() [2/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host name.
portThe port number.

◆ EmailClient() [3/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port,
Aspose::Email::Clients::SecurityOptions  securityOptions 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host name.
portThe port number.
securityOptionsSecurity mode for a mail client

◆ EmailClient() [4/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port,
System::String  username,
System::String  password 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host name.
portThe port number.
usernameThe username.
passwordThe password.

◆ EmailClient() [5/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port,
System::String  username,
System::String  password,
Aspose::Email::Clients::SecurityOptions  securityOptions 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host name.
portThe port number.
usernameThe username.
passwordThe password.
securityOptionsSecurity mode for a mail client

◆ EmailClient() [6/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port,
System::String  username,
System::String  authInfo,
bool  useOAuth 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host.
portThe port.
usernameThe username.
authInfoA string representation of the user password or the access token.
useOAuthDefines whether OAuth is used to login to the server

◆ EmailClient() [7/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port,
System::String  username,
System::String  authInfo,
bool  useOAuth,
Aspose::Email::Clients::SecurityOptions  securityOptions 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host.
portThe port.
usernameThe username.
authInfoA string representation of the user password or the access token.
useOAuthDefines whether OAuth is used to login to the server
securityOptionsSecurity mode for a mail client

◆ EmailClient() [8/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port,
System::String  username,
System::SharedPtr< ITokenProvider tokenProvider 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host.
portThe port.
usernameThe username.
tokenProviderTokenProvider allowing to retrieve access token.

◆ EmailClient() [9/9]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::EmailClient::EmailClient ( System::String  type,
System::String  host,
int32_t  port,
System::String  username,
System::SharedPtr< ITokenProvider tokenProvider,
Aspose::Email::Clients::SecurityOptions  securityOptions 
)
protected

Initializes a new instance of the EmailClient class.

Parameters
hostThe host.
portThe port.
usernameThe username.
tokenProviderTokenProvider allowing to retrieve access token.
securityOptions

Member Function Documentation

◆ CancelAsyncOperation()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::CancelAsyncOperation ( System::SharedPtr< System::IAsyncResult >  asyncResult)

Cancels asynchronous operation.

Parameters
asyncResultDefines asynchronous operation to cancel.

◆ CheckCredentials()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::CheckCredentials ( )
virtual

◆ ConnectionFinalize()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::ConnectionFinalize ( System::SharedPtr< System::Object >  sender,
System::SharedPtr< Base::ConnectionEventArgs >  args 
)
virtual

Performs finalization operation for specified connection

Parameters
senderThe source of the event.
argsAn ConnectionManagerEventArgs that contains the event data.

◆ CreateConnection() [1/2]

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<IConnection> Aspose::Email::Clients::EmailClient::CreateConnection ( )
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.

Returns
Returns connection object

◆ CreateConnection() [2/2]

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<IConnection> Aspose::Email::Clients::EmailClient::CreateConnection ( bool  createAsDefaultConnection)
virtual

Creates new (default or independent) connection for operations. Please see more in documentation for EmailClient.ConnectionAsgmtMode property.

Parameters
createAsDefaultConnectionIndicates if connection has to be created as default for current thread
Returns
Returns connection object

◆ Dispose() [1/2]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::Dispose ( )
virtual

Finalizes all operations with a server.

◆ Dispose() [2/2]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::Dispose ( bool  disposing)
protectedvirtual

Finalizes all operations with a server.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

◆ EndGroupOperation()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::Object> Aspose::Email::Clients::EmailClient::EndGroupOperation ( System::SharedPtr< System::IAsyncResult >  asyncResult)

Waits for the pending asynchronous operation to complete.

Parameters
asyncResultThe reference to the pending asynchronous request to wait for.

◆ get_AccessToken()

virtual ASPOSE_EMAIL_SHARED_API System::String Aspose::Email::Clients::EmailClient::get_AccessToken ( )
virtual

Gets the access token.

The string that represents access token.

◆ get_ClientCertificates()

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::Security::Cryptography::X509Certificates::X509CertificateCollection> Aspose::Email::Clients::EmailClient::get_ClientCertificates ( )
virtual

Contains collection of clients certificates

◆ get_ConnectionAsgmtMode()

virtual ASPOSE_EMAIL_SHARED_API ConnectionAsgmtType Aspose::Email::Clients::EmailClient::get_ConnectionAsgmtMode ( )
virtual

Gets value which defines mode of connection allocation in multiple threads environment

There are folowing connection types:

  • Main connection is connection created and disposed together with mail client.It can't be created or disposed manually.
  • Default connection is connection default for some thread. If default connection exists and ConnectionAsgmtMode allow, all methods of email client executed in this thread will be implicitly use this connection. Only one default connection can be exist per thread. It can be created manually or automatically. It depends on EmailClient.ConnectionAsgmtMode property. These connections can be created manually with EmailClient.CreateConnection(createAsDefaultConnection = true) method. If default connection does not used(depends on connection allocation mode), main connection used implicitly instead of it.
  • Independent connections are connections that are not linked to threads.They can be created manually and has to be used explicitly as method parameter. These connections can be created manually with EmailClient.CreateConnection() method or EmailClient.CreateConnection(createAsDefaultConnection = false) method.

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.

◆ get_ConnectionCheckupPeriod()

virtual ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Clients::EmailClient::get_ConnectionCheckupPeriod ( )
virtual

Period of connection checking up in milliseconds. Default value is 5 min.

◆ get_ConnectionPool()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<Aspose::Email::Clients::ConnectionPool> Aspose::Email::Clients::EmailClient::get_ConnectionPool ( ) const

Gets connection pool for the client

◆ get_ConnectionsQuantity()

virtual ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Clients::EmailClient::get_ConnectionsQuantity ( )
virtual

Gets quantity of connections in multy-connection mode

◆ get_ConnectionState()

ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::ConnectionState Aspose::Email::Clients::EmailClient::get_ConnectionState ( )

Gets the current state of the connection.

◆ get_Credentials()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::Net::ICredentialsByHost> Aspose::Email::Clients::EmailClient::get_Credentials ( )

◆ get_CurrentConnection()

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<IConnection> Aspose::Email::Clients::EmailClient::get_CurrentConnection ( )
virtual

Gets current connection according to ConnectionAsgmtMode option

◆ get_DefaultPort()

virtual ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Clients::EmailClient::get_DefaultPort ( )
virtual

Gets default port for client

◆ get_EnableLogger()

ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Clients::EmailClient::get_EnableLogger ( )

Gets value which allows enable/disable logger

◆ get_Host()

virtual ASPOSE_EMAIL_SHARED_API System::String Aspose::Email::Clients::EmailClient::get_Host ( )
virtual

Gets the host name.

The host name.

◆ get_LogFileName()

ASPOSE_EMAIL_SHARED_API System::String Aspose::Email::Clients::EmailClient::get_LogFileName ( ) const

Gets log file name

◆ get_Logger()

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<Aspose::Email::Tools::Logging::Logger> Aspose::Email::Clients::EmailClient::get_Logger ( )
virtual

◆ get_Password()

virtual ASPOSE_EMAIL_SHARED_API System::String Aspose::Email::Clients::EmailClient::get_Password ( )
virtual

Gets the password.

The string that represents the password.

◆ get_Port()

virtual ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Clients::EmailClient::get_Port ( )
virtual

Gets the port.

The port number.

◆ get_Proxy()

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<Aspose::Email::Clients::Proxy> Aspose::Email::Clients::EmailClient::get_Proxy ( )
virtual

Gets proxy for the client

◆ get_SecurityOptions()

virtual ASPOSE_EMAIL_SHARED_API Aspose::Email::Clients::SecurityOptions Aspose::Email::Clients::EmailClient::get_SecurityOptions ( )
virtual

Security mode for a mail client

◆ get_SupportedEncryption()

virtual ASPOSE_EMAIL_SHARED_API Base::EncryptionProtocols Aspose::Email::Clients::EmailClient::get_SupportedEncryption ( )
virtual

Defines the versions of SSL/TLS encription protocols to be uised.

◆ get_Timeout()

ASPOSE_EMAIL_SHARED_API int32_t Aspose::Email::Clients::EmailClient::get_Timeout ( )

Gets the timeout for mail operations

The timeout in milliseconds

◆ get_TokenProvider()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<ITokenProvider> Aspose::Email::Clients::EmailClient::get_TokenProvider ( ) const

Gets TokenProvider allowing to retrieve access token.

◆ get_UseAuthentication()

virtual ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Clients::EmailClient::get_UseAuthentication ( )
virtual

Indicates whether authentication is used.

◆ get_UseDateInLogFileName()

ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Clients::EmailClient::get_UseDateInLogFileName ( ) const

Gets value which indicates if date has to be used in log file name.

◆ get_UseDefaultCredentials()

virtual ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Clients::EmailClient::get_UseDefaultCredentials ( )
virtual

Gets a Boolean value that controls whether the DefaultCredentials are sent with requests.

◆ get_UseMultiConnection()

virtual ASPOSE_EMAIL_SHARED_API MultiConnectionMode Aspose::Email::Clients::EmailClient::get_UseMultiConnection ( )
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.

◆ get_UseMultyConnection()

virtual ASPOSE_EMAIL_SHARED_API MultyConnectionMode Aspose::Email::Clients::EmailClient::get_UseMultyConnection ( )
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.

Deprecated:
This property is obsolete and will be removed soon. Please, use UseMultiConnection instead.

◆ get_UsePipelining()

virtual ASPOSE_EMAIL_SHARED_API System::SharedPtr<PipeliningStatus> Aspose::Email::Clients::EmailClient::get_UsePipelining ( )
virtual

Gets object which indicates whether the pipelining mode is enabled.

◆ get_Username()

virtual ASPOSE_EMAIL_SHARED_API System::String Aspose::Email::Clients::EmailClient::get_Username ( )
virtual

Gets the username.

The username string.

◆ GetCapabilities()

virtual ASPOSE_EMAIL_SHARED_API System::ArrayPtr<System::String> Aspose::Email::Clients::EmailClient::GetCapabilities ( )
virtual

◆ InitializeConnectionPool()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::InitializeConnectionPool ( )

◆ initializeLogger()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::initializeLogger ( )

◆ Noop() [1/3]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::Noop ( )
pure virtual

'No operation' command

◆ Noop() [2/3]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::Noop ( System::SharedPtr< Connection >  connection,
int32_t  timeout 
)
pure virtual

'No operation' command

Parameters
connectionConnection to a server
timeouttimeout of a command

◆ Noop() [3/3]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::Noop ( System::SharedPtr< IConnection connection)
pure virtual

'No operation' command

Parameters
connectionConnection to a server

◆ ResetLogSettings()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::ResetLogSettings ( )

Resets logging settings to default.

◆ set_AccessToken()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_AccessToken ( System::String  value)
virtual

Sets the access token.

The string that represents access token.

◆ set_ConnectionAsgmtMode()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_ConnectionAsgmtMode ( ConnectionAsgmtType  value)
virtual

Sets value which defines mode of connection allocation in multiple threads environment

There are folowing connection types:

  • Main connection is connection created and disposed together with mail client.It can't be created or disposed manually.
  • Default connection is connection default for some thread. If default connection exists and ConnectionAsgmtMode allow, all methods of email client executed in this thread will be implicitly use this connection. Only one default connection can be exist per thread. It can be created manually or automatically. It depends on EmailClient.ConnectionAsgmtMode property. These connections can be created manually with EmailClient.CreateConnection(createAsDefaultConnection = true) method. If default connection does not used(depends on connection allocation mode), main connection used implicitly instead of it.
  • Independent connections are connections that are not linked to threads.They can be created manually and has to be used explicitly as method parameter. These connections can be created manually with EmailClient.CreateConnection() method or EmailClient.CreateConnection(createAsDefaultConnection = false) method.

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.

◆ set_ConnectionCheckupPeriod()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_ConnectionCheckupPeriod ( int32_t  value)
virtual

Period of connection checking up in milliseconds. Default value is 5 min.

◆ set_ConnectionsQuantity()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_ConnectionsQuantity ( int32_t  value)
virtual

Sets quantity of connections in multy-connection mode

◆ set_Credentials()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Credentials ( System::SharedPtr< System::Net::ICredentialsByHost >  value)

◆ set_EnableLogger()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_EnableLogger ( bool  value)

Sets value which allows enable/disable logger

◆ set_Host()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Host ( System::String  value)
virtual

Sets the host name.

The host name.

◆ set_LogFileName()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_LogFileName ( System::String  value)

Sets log file name

◆ set_Logger()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Logger ( System::SharedPtr< Aspose::Email::Tools::Logging::Logger >  value)
virtual

◆ set_Password()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Password ( System::String  value)
virtual

Sets the password.

The string that represents the password.

◆ set_Port()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Port ( int32_t  value)
virtual

Sets the port.

The port number.

◆ set_Proxy()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Proxy ( System::SharedPtr< Aspose::Email::Clients::Proxy value)
virtual

Sets proxy for the client

◆ set_SecurityOptions()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_SecurityOptions ( Aspose::Email::Clients::SecurityOptions  value)
virtual

Security mode for a mail client

◆ set_SupportedEncryption()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_SupportedEncryption ( Base::EncryptionProtocols  value)
virtual

Defines the versions of SSL/TLS encription protocols to be uised.

◆ set_Timeout()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Timeout ( int32_t  value)

Sets the timeout for mail operations

The timeout in milliseconds

◆ set_TokenProvider()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_TokenProvider ( System::SharedPtr< ITokenProvider value)

Sets TokenProvider allowing to retrieve access token.

◆ set_UseAuthentication()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_UseAuthentication ( bool  value)
virtual

Indicates whether authentication is used.

◆ set_UseDateInLogFileName()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_UseDateInLogFileName ( bool  value)

Sets value which indicates if date has to be used in log file name.

◆ set_UseDefaultCredentials()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_UseDefaultCredentials ( bool  value)
virtual

Sets a Boolean value that controls whether the DefaultCredentials are sent with requests.

◆ set_UseMultiConnection()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_UseMultiConnection ( MultiConnectionMode  value)
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.

◆ set_UseMultyConnection()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_UseMultyConnection ( MultyConnectionMode  value)
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.

Deprecated:
This property is obsolete and will be removed soon. Please, use UseMultiConnection instead.

◆ set_UsePipelining()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_UsePipelining ( System::SharedPtr< PipeliningStatus value)
virtual

Sets object which indicates whether the pipelining mode is enabled.

◆ set_Username()

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Clients::EmailClient::set_Username ( System::String  value)
virtual

Sets the username.

The username string.

Friends And Related Function Documentation

◆ Aspose::Email::Clients::Base::BaseProtocolCommand

friend class Aspose::Email::Clients::Base::BaseProtocolCommand
friend

◆ Aspose::Email::Clients::ConnectionPool

friend class Aspose::Email::Clients::ConnectionPool
friend

◆ Aspose::Email::Clients::CredentialsByHostClient

Member Data Documentation

◆ accessToken

System::String Aspose::Email::Clients::EmailClient::accessToken

◆ clientType

System::String Aspose::Email::Clients::EmailClient::clientType

◆ connectionPool

System::SharedPtr<Aspose::Email::Clients::ConnectionPool> Aspose::Email::Clients::EmailClient::connectionPool

◆ logger

System::SharedPtr<Aspose::Email::Tools::Logging::Logger> Aspose::Email::Clients::EmailClient::logger

◆ loggerSyncObj

System::SharedPtr<System::Object> Aspose::Email::Clients::EmailClient::loggerSyncObj

◆ logManagerSyncObj

ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::Object> Aspose::Email::Clients::EmailClient::logManagerSyncObj
static

◆ password

System::String Aspose::Email::Clients::EmailClient::password

◆ tokenProvider

System::SharedPtr<ITokenProvider> Aspose::Email::Clients::EmailClient::tokenProvider

◆ username

System::String Aspose::Email::Clients::EmailClient::username