public
|
#
__construct( CApiGlobalManager & $oManager, $sForcedStorage = '' )
Creates a new instance of the object.
Creates a new instance of the object.
Parameters
- $oManager
- $oManager
- $sForcedStorage
|
public
CAccount
|
#
getAccountByEmail( string $sEmail )
Retrieves information about account wich is specified as default. Email address is used for look up.
The method is especially useful in case if your product configuration allows for adding multiple accounts per user.
Retrieves information about account wich is specified as default. Email address is used for look up.
The method is especially useful in case if your product configuration allows for adding multiple accounts per user.
Parameters
- $sEmail
- Email address associated with the account.
Returns
Api
|
public
CAccount
|
#
getAccountById( integer $mAccountId, boolean $bIdIsMd5 = false )
Retrieves information on WebMail Pro account. Account ID is used for look up.
Retrieves information on WebMail Pro account. Account ID is used for look up.
Parameters
- $mAccountId
- Account identifier.
- $bIdIsMd5
- Default value is false.
Returns
Api
|
public
CUser |false
|
#
getUserById( integer $iUserId )
Retrieves information on particular WebMail Pro user.
Retrieves information on particular WebMail Pro user.
Parameters
- $iUserId
- User identifier.
Returns
Api
|
public
integer
|
#
getDefaultAccountDomainId( integer $iUserId )
Returns domain identifier for primary user account. The method is especially useful in case
if your product configuration allows for adding multiple accounts per user.
Returns domain identifier for primary user account. The method is especially useful in case
if your product configuration allows for adding multiple accounts per user.
Parameters
- $iUserId
- WebMail Pro user identifier (not to be confused with account ID).
Returns
integer
Api
|
public
integer
|
#
getDefaultAccountId( integer $iUserId )
Returns identifier of primary user account.
Returns identifier of primary user account.
Parameters
- $iUserId
- WebMail Pro user identifier.
Returns
integer
Api
|
public
CAccount
|
#
getDefaultAccount( integer $iUserId )
Returns default account of user.
Returns default account of user.
Parameters
- $iUserId
- WebMail Pro user identifier.
Returns
Api
|
public
integer
|
#
getAccountUsedSpace( string $sEmail )
Returns account used space in Kb.
Returns account used space in Kb.
Parameters
- $sEmail
- Email address associated with the account.
Returns
integer
Api
|
public
boolean
|
#
createIdentity( CIdentity & $oIdentity )
Creates identity in account.
Creates identity in account.
Parameters
- $oIdentity
- $oIdentity Identity to create.
Returns
boolean
Api
|
public
boolean
|
#
createAccount( CAccount & $oAccount, boolean $bWithMailConnection = true )
Creates WebMail account. In most cases, using simpler loginToAccount wrapper is recommended.
Creates WebMail account. In most cases, using simpler loginToAccount wrapper is recommended.
Parameters
- $oAccount
- $oAccount Object instance with prepopulated account properties.
- $bWithMailConnection
- Default value is true. Defines whether account credentials should be verified against mail server.
Returns
boolean
Api
|
public
boolean
|
#
enableAccounts( array $aAccountsIds, boolean $bIsEnabled )
Enable/disable one or several WebMail Pro accounts.
Enable/disable one or several WebMail Pro accounts.
Parameters
- $aAccountsIds
- List of accounts to be enabled/disabled.
- $bIsEnabled
- true for enabling accounts, false for disabling them.
Returns
boolean
Api
|
public
boolean
|
#
updateAccount( CAccount & $oAccount, boolean $bSetIdentityDefault = false )
Saves changes made to the account.
Saves changes made to the account.
Parameters
- $oAccount
- $oAccount Account object containing data to be saved.
- $bSetIdentityDefault
- Default value is false.. If true account identity needs treatting as default.
Returns
boolean
Api
|
public
boolean
|
#
updateIdentity( CIdentity & $oIdentity )
Saves changes made to the identity.
Saves changes made to the identity.
Parameters
- $oIdentity
- $oIdentity Identity object containing data to be saved.
Returns
boolean
Api
|
public
boolean
|
#
updateAccountLastLoginAndCount( integer $iUserId )
For the given user, updates login-related information including time of last login.
For the given user, updates login-related information including time of last login.
Parameters
- $iUserId
- User identifier.
Returns
boolean
Api
|
public
boolean
|
#
accountExists( CAccount $oAccount )
Checks if particular account exists.
Checks if particular account exists.
Parameters
- $oAccount
- Object instance with prepopulated account properties.
Returns
boolean
Api
|
public
boolean
|
#
deleteIdentity( integer $iIdentityId )
Deletes identity.
Parameters
- $iIdentityId
- Identity identifier.
Returns
boolean
Api
|
public
boolean
|
#
deleteAccount( CAccount $oAccount )
Deletes account from WebMail Pro database.
Deletes account from WebMail Pro database.
Parameters
- $oAccount
- Object instance with prepopulated account properties.
Returns
boolean
Api
|
public
boolean
|
#
deleteAccountById( integer $iAccountId )
Deletes account from WebMail Pro database. Account ID is used for look up.
Deletes account from WebMail Pro database. Account ID is used for look up.
Parameters
- $iAccountId
- Identifier of the account to delete.
Returns
boolean
Api
|
public
boolean
|
#
deleteAccountByEmail( string $sAccountToDelete )
Deletes account from WebMail Pro database. Email address is used for look up.
Deletes account from WebMail Pro database. Email address is used for look up.
Parameters
- $sAccountToDelete
- Email address of the account to delete.
Returns
boolean
Api
|
public
boolean
|
#
setSafetySender( string $iUserId, string $sEmail )
Updates a list of senders wich are considered safe to show external images coming from.
Updates a list of senders wich are considered safe to show external images coming from.
Parameters
- $iUserId
- User identifier.
- $sEmail
- Email of sender wich is considered safe.
Returns
boolean
Api
|
public
boolean
|
#
getSafetySender( string $iUserId, string $sEmail, boolean $bUseCache = false )
Checks whether specific address is in safelist for particular user.
Checks whether specific address is in safelist for particular user.
Parameters
- $iUserId
- User identifier.
- $sEmail
- Email of sender.
- $bUseCache
- Default value is false. If true value of sender safety will be retrieved from cache.
Returns
boolean
Api
|
public
boolean
|
#
clearSafetySenders( string $iUserId )
Purges all entries in safelist of particular user.
Purges all entries in safelist of particular user.
Parameters
- $iUserId
- User identifier.
Returns
boolean
Api
|
public
array|false
|
#
getAccountIdList( integer $iUserId )
Retrieves list of accounts for given WebMail Pro user.
Retrieves list of accounts for given WebMail Pro user.
Parameters
- $iUserId
- User identifier.
Returns
array|false array holding a list of account IDs, or false
Api
|
public
CIdentity |boolean
|
#
getIdentity( integer $iIdentityId )
Returns identity.
Parameters
- $iIdentityId
- Indentity identifier.
Returns
Api
|
public
array|boolean
|
#
getAccountIdentities( integer $IdAccount )
Returns list of identities belonging to account.
Returns list of identities belonging to account.
Parameters
- $IdAccount
- Identifier of account that contains identities to get.
Returns
array|boolean
Api
|
public
array|boolean
|
#
getUserIdentities( integer $IdUser )
Returns list of identities belonging to user.
Returns list of identities belonging to user.
Parameters
- $IdUser
- Identifier of user that contains identities to get.
Returns
array|boolean
Api
|
public
array|false
|
#
getUserAccounts( integer $iUserId )
Retrieves list of information about email accounts for specific user.
Retrieves list of information about email accounts for specific user.
Parameters
- $iUserId
- User identifier.
Returns
array|false array(int IdAccount => array(bool isDefaultAccount, string email, string friendlyName, string signature, int isSignatureHtml, int isSignatureAdded))
Api
|
public
integer|false
|
#
getUserAccountId( integer $iUserId, string $sEmail )
Returns account identifier for specific user and account email.
Returns account identifier for specific user and account email.
Parameters
- $iUserId
- Identifier of user that contains account.
- $sEmail
- Email of account that is looked up.
Returns
integer|false
Api
|
public
array
|
#
getUserList( integer $iDomainId, integer $iPage, integer $iUsersPerPage, string $sOrderBy = 'email', boolean $bAscOrderType = true, string $sSearchDesc = '' )
Obtains list of information about users for specific domain. Domain identifier is used for look up.
The answer contains information only about default account of founded user.
Obtains list of information about users for specific domain. Domain identifier is used for look up.
The answer contains information only about default account of founded user.
Parameters
- $iDomainId
- Domain identifier.
- $iPage
- List page.
- $iUsersPerPage
- Number of users on a single page.
- $sOrderBy
- Default value is 'email'.. Field by which to sort.
- $bAscOrderType
- Default value is true. If true the sort order type is ascending.
- $sSearchDesc
- Default value is empty string. If specified, the search goes on by substring in the name and email of default account.
Returns
array | false [IdAccount => [IsMailingList, Email, FriendlyName, IsDisabled, IdUser, StorageQuota, LastLogin]]
Api
|
public
array|false
|
#
getDefaultAccountIdList( integer $iDomainId, integer $iPage, integer $iUsersPerPage )
Obtains list of identifiers of accounts which are specified as default. Domain identifier is used for look up.
Obtains list of identifiers of accounts which are specified as default. Domain identifier is used for look up.
Parameters
- $iDomainId
- Domain identifier.
- $iPage
- List page.
- $iUsersPerPage
- Number of identifiers on a single page.
Returns
array|false
Api
|
public
array|false
|
#
getDefaultAccountList( )
Obtains list of accounts which are specified as default.
Obtains list of accounts which are specified as default.
Returns
array|false
Api
|
public
array|false
|
#
getTwilioNumbers( integer $iTenantId )
Obtains twilio numbers for default accounts with allowed twilio. Tenant identifier is used for look up.
Obtains twilio numbers for default accounts with allowed twilio. Tenant identifier is used for look up.
Parameters
- $iTenantId
- Tenant identifier.
Returns
array|false
Api
|
public
integer|false
|
#
getUsersCountForDomain( integer $iDomainId, string $sSearchDesc = '' )
Determines how many users are in particular domain, with optional filtering. Domain identifier is used for look up.
Determines how many users are in particular domain, with optional filtering. Domain identifier is used for look up.
Parameters
- $iDomainId
- Domain identifier.
- $sSearchDesc
- Default value is empty string. If not empty, only users matching this pattern are counted.
Returns
integer|false
Api
|
public
integer|false
|
#
getUsersCountForTenant( integer $iTenantId )
Determines how many users are in particular tenant. Tenant identifier is used for look up.
Determines how many users are in particular tenant. Tenant identifier is used for look up.
Parameters
- $iTenantId
- Tenant identifier.
Returns
integer|false
Api
|
public
integer
|
#
getTotalUsersCount( )
Calculates total number of users registered in WebMail Pro.
Calculates total number of users registered in WebMail Pro.
Returns
integer
Api
|
public
CCalUser |false
|
#
getCalUser( integer $iUserId )
Obtains CCalUser object that contains calendar settings for specified user. User identifier is used for look up.
Obtains CCalUser object that contains calendar settings for specified user. User identifier is used for look up.
Parameters
- $iUserId
- User identifier.
Returns
Api
|
public
boolean
|
#
createCalUser( CCalUser & $oCalUser )
Creates calendar user in storage.
Creates calendar user in storage.
Parameters
- $oCalUser
- $oCalUser CCalUser object.
Returns
boolean
Api
|
public
CCalUser |false
|
#
getOrCreateCalUser( integer $iUserId )
Obtains CCalUser object that contains calendar settings for specified user. User identifier is used for look up.
If CCalUser object is missing in the storage calendar user will be created in it.
Obtains CCalUser object that contains calendar settings for specified user. User identifier is used for look up.
If CCalUser object is missing in the storage calendar user will be created in it.
Parameters
- $iUserId
- User identifier.
Returns
Api
|
public
boolean
|
#
updateCalUser( CCalUser $oCalUser )
Updates calendar user settings.
Updates calendar user settings.
Parameters
- $oCalUser
- CCalUser object.
Returns
boolean
Api
|
public
boolean
|
#
deleteCalUser( integer $iUserId )
Deletes calendar user settings from the storage. User identifier is used for look up.
Deletes calendar user settings from the storage. User identifier is used for look up.
Parameters
- $iUserId
- User identifier.
Returns
boolean
Api
|