Methods |
public
static
|
getInstance(): Module
|
#
|
public
|
init()
Initializes Mail Module.
|
#
|
public
static
|
Decorator(): Module
|
#
|
public
|
getAccountsManager(): Manager
|
#
|
public
|
setAccountsManager($oManager)
|
#
|
public
|
getServersManager(): Manager
|
#
|
public
|
getIdentitiesManager(): Manager
|
#
|
public
|
getMailManager(): Manager
|
#
|
public
|
getSieveManager(): Manager
|
#
|
public
|
getFilecacheManager(): Filecache
|
#
|
public
static
|
checkAccess(MailAccount $oAccount = null, int $iUserId = null)
Checks if actions are allowed for authenticated user.
Checks if actions are allowed for authenticated user.
Parameters
$oAccount |
Account should be checked if it belongs to authenticated user. If it's null check is not needed.
|
$iUserId |
User identifier should be checked if it's identifier of authenticated user. If it's null check is not needed.
|
Throws
|
#
|
public
|
GetSettings(): array
Obtains list of module settings for authenticated user.
Obtains list of module settings for authenticated user.
Overrides
|
#
|
public
|
UpdateSettings(
boolean $AutocreateMailAccountOnNewUserFirstLogin = null,
boolean $AllowAddAccounts = null,
boolean $AllowAutosaveInDrafts = null,
): boolean
Updates module global or per user settings.
Updates module global or per user settings.
Parameters
$AutocreateMailAccountOnNewUserFirstLogin |
Allows auto-provisioning of new users.
|
$AllowAddAccounts |
Allows users to add external mailboxes.
|
$AllowAutosaveInDrafts |
Indicates if message should be saved automatically while compose.
|
|
#
|
public
|
GetEntitySpaceLimits($Type, $UserId = null, $TenantId = null)
|
#
|
public
|
UpdateEntitySpaceLimits($Type, $UserId, $TenantId, $TenantSpaceLimitMb, $UserSpaceLimitMb = null)
|
#
|
public
|
GetAccounts(int $UserId): array|boolean
Obtains list of mail accounts for user.
Obtains list of mail accounts for user.
Parameters
|
#
|
public
|
GetAccount(int $AccountId): MailAccount|boolean
Obtains mail account with specified identifier.
Obtains mail account with specified identifier.
Parameters
$AccountId |
Identifier of mail account to obtain.
|
|
#
|
public
|
GetAccountByEmail($Email, $UserId = 0)
|
#
|
public
|
CreateAccount(
int $UserId = 0,
string $FriendlyName = '',
string $Email = '',
string $IncomingLogin = '',
string $IncomingPassword = '',
array $Server = null,
$XAuth = null,
): MailAccount|boolean
Creates mail account.
Parameters
$UserId |
User identifier.
|
$FriendlyName |
Friendly name.
|
$Email |
Email.
|
$IncomingLogin |
Login for IMAP connection.
|
$IncomingPassword |
Password for IMAP connection.
|
$Server |
List of settings for IMAP and SMTP connections.
|
|
#
|
public
|
UpdateAccount(
int $AccountID,
boolean $UseToAuthorize = null,
string $Email = null,
string $FriendlyName = null,
string $IncomingLogin = null,
string $IncomingPassword = null,
array $Server = null,
boolean $UseThreading = null,
boolean $SaveRepliesToCurrFolder = null,
): boolean
Updates mail account.
Parameters
$AccountID |
Identifier of account to update.
|
$UseToAuthorize |
Indicates if account can be used to authorize user.
|
$Email |
New email.
|
$FriendlyName |
New friendly name.
|
$IncomingLogin |
New login for IMAP connection.
|
$IncomingPassword |
New password for IMAP connection.
|
$Server |
List of settings for IMAP and SMTP connections.
|
$UseThreading |
Indicates if account uses mail threading.
|
$SaveRepliesToCurrFolder |
Indicates if replies should be saved to current folder (not Sent Items)
|
Throws
|
#
|
public
|
UpdateAccountUnifiedMailbox(
$AccountID,
$IncludeInUnifiedMailbox,
$ShowUnifiedMailboxLabel,
$UnifiedMailboxLabelText,
$UnifiedMailboxLabelColor,
)
|
#
|
public
|
DeleteAccount(int $AccountID): boolean
Deletes mail account.
Parameters
$AccountID |
Account identifier.
|
Throws
|
#
|
public
|
GetServers(int $TenantId = 0, int $Offset = 0, int $Limit = 0, string $Search = ''): array
Obtains list of servers which contains settings for IMAP and SMTP connections.
Obtains list of servers which contains settings for IMAP and SMTP connections.
Parameters
$TenantId |
Identifier of tenant which contains servers to return. If $TenantId is 0 returns server which are belonged to SuperAdmin, not Tenant.
|
$Offset |
Says to skip that many servers before beginning to return them.
|
$Limit |
Limit says to return that many servers in the list.
|
$Search |
Search string.
|
|
#
|
public
|
GetServer(int $ServerId): Server|boolean
Obtains server with specified server identifier.
Obtains server with specified server identifier.
Parameters
$ServerId |
Server identifier.
|
|
#
|
public
|
CreateServer(
string $Name,
string $IncomingServer,
int $IncomingPort,
boolean $IncomingUseSsl,
string $OutgoingServer,
int $OutgoingPort,
boolean $OutgoingUseSsl,
string $SmtpAuthType,
string $Domains,
boolean $EnableThreading = true,
boolean $EnableSieve = false,
int $SievePort = 4190,
string $SmtpLogin = '',
string $SmtpPassword = '',
boolean $UseFullEmailAddressAsLogin = true,
int $TenantId = 0,
boolean $SetExternalAccessServers = false,
string $ExternalAccessImapServer = '',
int $ExternalAccessImapPort = 143,
int $ExternalAccessImapAlterPort = 0,
boolean $ExternalAccessImapUseSsl = false,
string $ExternalAccessPop3Server = '',
int $ExternalAccessPop3Port = 143,
int $ExternalAccessPop3AlterPort = 0,
boolean $ExternalAccessPop3UseSsl = false,
string $ExternalAccessSmtpServer = '',
int $ExternalAccessSmtpPort = 25,
int $ExternalAccessSmtpAlterPort = 0,
$ExternalAccessImapSmtpUseSsl = false,
boolean $OAuthEnable = false,
string $OAuthName = '',
string $OAuthType = '',
string $OAuthIconUrl = '',
): int|boolean
Creates mail server.
Parameters
$Name |
Server name.
|
$IncomingServer |
IMAP server.
|
$IncomingPort |
Port for connection to IMAP server.
|
$IncomingUseSsl |
Indicates if it is necessary to use SSL while connecting to IMAP server.
|
$OutgoingServer |
SMTP server.
|
$OutgoingPort |
Port for connection to SMTP server.
|
$OutgoingUseSsl |
Indicates if it is necessary to use SSL while connecting to SMTP server.
|
$SmtpAuthType |
SMTP authentication type: '0' - no authentication, '1' - specified credentials, '2' - user credentials.
|
$Domains |
List of domains separated by comma.
|
$SmtpLogin |
(optional)
|
$SmtpPassword |
(optional)
|
$UseFullEmailAddressAsLogin |
(optional)
|
$TenantId |
(optional) If tenant identifier is specified creates mail server belonged to specified tenant.
|
|
#
|
public
|
UpdateServer(
int $ServerId,
string $Name,
string $IncomingServer,
int $IncomingPort,
boolean $IncomingUseSsl,
string $OutgoingServer,
int $OutgoingPort,
boolean $OutgoingUseSsl,
boolean $SmtpAuthType,
string $Domains,
boolean $EnableThreading,
boolean $EnableSieve,
int $SievePort,
string $SmtpLogin = '',
string $SmtpPassword = '',
boolean $UseFullEmailAddressAsLogin = true,
int $TenantId = 0,
boolean $SetExternalAccessServers = false,
string $ExternalAccessImapServer = '',
int $ExternalAccessImapPort = 143,
int $ExternalAccessImapAlterPort = 0,
boolean $ExternalAccessImapUseSsl = false,
string $ExternalAccessPop3Server = '',
int $ExternalAccessPop3Port = 143,
int $ExternalAccessPop3AlterPort = 0,
boolean $ExternalAccessPop3UseSsl = false,
string $ExternalAccessSmtpServer = '',
int $ExternalAccessSmtpPort = 25,
int $ExternalAccessSmtpAlterPort = 0,
boolean $ExternalAccessSmtpUseSsl = false,
boolean $OAuthEnable = false,
string $OAuthName = '',
string $OAuthType = '',
string $OAuthIconUrl = '',
): boolean
Updates mail server with specified identifier.
Updates mail server with specified identifier.
Parameters
$ServerId |
Server identifier.
|
$Name |
New server name.
|
$IncomingServer |
New IMAP server.
|
$IncomingPort |
New port for connection to IMAP server.
|
$IncomingUseSsl |
Indicates if it is necessary to use SSL while connecting to IMAP server.
|
$OutgoingServer |
New SMTP server.
|
$OutgoingPort |
New port for connection to SMTP server.
|
$OutgoingUseSsl |
Indicates if it is necessary to use SSL while connecting to SMTP server.
|
$SmtpAuthType |
SMTP authentication type: '0' - no authentication, '1' - specified credentials, '2' - user credentials.
|
$Domains |
New list of domains separated by comma.
|
$TenantId |
If tenant identifier is specified updates mail server belonged to specified tenant.
|
|
#
|
public
|
DeleteServer(int $ServerId, int $TenantId = 0): boolean
Deletes mail server.
Parameters
$ServerId |
Identifier of server to delete.
|
$TenantId |
Identifier of tenant that contains mail server.
|
|
#
|
public
|
GetFolders(int $AccountID): array
Obtains list of folders for specified account.
Obtains list of folders for specified account.
Parameters
$AccountID |
Account identifier.
|
|
#
|
public
|
getSortInfo($SortBy, $SortOrder)
|
#
|
public
|
GetMessages(
int $AccountID,
string $Folder,
int $Offset = 0,
int $Limit = 20,
string $Search = '',
string $Filters = '',
int $UseThreading = false,
string $InboxUidnext = '',
$SortBy = null,
$SortOrder = null,
): array
Obtains message list for specified account and folder.
Obtains message list for specified account and folder.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Offset |
Says to skip that many messages before beginning to return them.
|
$Limit |
Limit says to return that many messages in the list.
|
$Search |
Search string.
|
$Filters |
List of conditions to obtain messages.
|
$UseThreading |
Indicates if it is necessary to return messages in threads.
|
$InboxUidnext |
UIDNEXT Inbox last value that is known on client side.
|
Throws
|
#
|
public
|
GetMessagesByFolders(
$AccountID,
$Folder = '',
$Offset = 0,
$Limit = 20,
$Search = '',
$Filters = '',
$UseThreading = false,
$InboxUidnext = '',
$SortBy = null,
$SortOrder = null,
)
|
#
|
public
|
GetUnifiedMailboxMessages(
$UserId,
$Folder = 'INBOX',
$Offset = 0,
$Limit = 20,
$Search = '',
$Filters = '',
$UseThreading = false,
$InboxUidnext = '',
$SortOrder = SortOrder::DESC,
)
|
#
|
public
|
GetMessagesInfo($AccountID, $Folder, $Search = null, $UseThreading = false, $SortBy = null, $SortOrder = null)
|
#
|
public
|
GetUnifiedRelevantFoldersInformation($AccountsData)
|
#
|
public
|
GetRelevantFoldersInformation(int $AccountID, array $Folders, boolean $UseListStatusIfPossible): array
Obtains relevant information about total and unseen messages count in specified folders.
Obtains relevant information about total and unseen messages count in specified folders.
Parameters
$AccountID |
Account identifier.
|
$Folders |
List of folders full names.
|
$UseListStatusIfPossible |
Indicates if LIST-STATUS command should be used if it's supported by IMAP server.
|
Throws
|
#
|
public
|
GetQuota(int $AccountID): array|boolean
Obtains mail account quota.
Obtains mail account quota.
Parameters
$AccountID |
Account identifier.
|
|
#
|
public
|
GetMessagesBodies(int $AccountID, string $Folder, array $Uids, $MessageBodyTruncationThreshold = null): array
Obtains full data of specified messages including plain text, HTML text and attachments.
Obtains full data of specified messages including plain text, HTML text and attachments.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Uids |
List of messages' uids.
|
Throws
|
#
|
public
|
GetMessage(
int $AccountID,
string $Folder,
string $Uid,
string $Rfc822MimeIndex = '',
$MessageBodyTruncationThreshold = null,
$oBody = null,
): Message
Obtains full data of specified message including plain text, HTML text and attachments.
Obtains full data of specified message including plain text, HTML text and attachments.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Uid |
Message uid.
|
$Rfc822MimeIndex |
If specified obtains message from attachment of another message.
|
Throws
|
#
|
public
|
Unsubscribe($AccountID, $Folder, $Uid): bool
Unsubscribe the account from the mailing list.
Unsubscribe the account from the mailing list.
|
#
|
public
|
GetMessageByMessageID($AccountID, $Folder, $UidFrom, $MessageID)
|
#
|
public
|
SetMessagesSeen(int $AccountID, string $Folder, string $Uids, boolean $SetAction): boolean
Puts on or off seen flag of message.
Puts on or off seen flag of message.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Uids |
List of messages' uids.
|
$SetAction |
Indicates if flag should be set or removed.
|
|
#
|
public
|
SetMessageFlagged(int $AccountID, string $Folder, string $Uids, boolean $SetAction): boolean
Puts on or off flagged flag of message.
Puts on or off flagged flag of message.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Uids |
List of messages' uids.
|
$SetAction |
Indicates if flag should be set or removed.
|
|
#
|
public
|
SetAllMessagesSeen(int $AccountID, string $Folder): boolean
Puts on seen flag for all messages in folder.
Puts on seen flag for all messages in folder.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
Throws
|
#
|
public
|
CopyMessages(int $AccountID, string $Folder, string $ToFolder, string $Uids): boolean
Moves messages from one folder to another.
Moves messages from one folder to another.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Full name of the folder messages will be moved from.
|
$ToFolder |
Full name of the folder which messages will be moved to.
|
$Uids |
Uids of messages to move.
|
Throws
|
#
|
public
|
MoveMessages(int $AccountID, string $Folder, string $ToFolder, string $Uids): boolean
Moves messages from one folder to another.
Moves messages from one folder to another.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Full name of the folder messages will be moved from.
|
$ToFolder |
Full name of the folder which messages will be moved to.
|
$Uids |
Uids of messages to move.
|
Throws
|
#
|
public
|
DeleteMessages(int $AccountID, string $Folder, string $Uids): boolean
Deletes messages from folder.
Deletes messages from folder.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Uids |
Uids of messages to delete.
|
Throws
|
#
|
public
|
CreateFolder(int $AccountID, string $FolderNameInUtf8, string $FolderParentFullNameRaw, string $Delimiter): boolean
Creates folder in mail account.
Creates folder in mail account.
Parameters
$AccountID |
Account identifier.
|
$FolderNameInUtf8 |
Name of folder to create.
|
$FolderParentFullNameRaw |
Full name of parent folder.
|
$Delimiter |
Delimiter that is used if full folder name.
|
Throws
|
#
|
public
|
RenameFolder(
int $AccountID,
string $PrevFolderFullNameRaw,
string $NewFolderNameInUtf8,
$ChangeParent,
$NewParentFolder,
): array|boolean
Renames folder.
Parameters
$AccountID |
Account identifier.
|
$PrevFolderFullNameRaw |
Full name of folder to rename.
|
$NewFolderNameInUtf8 |
New folder name.
|
Throws
|
#
|
public
|
DeleteFolder(int $AccountID, string $Folder): boolean
Deletes folder.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Full name of folder to delete.
|
Throws
|
#
|
public
|
SubscribeFolder(int $AccountID, string $Folder, boolean $SetAction): boolean
Subscribes/unsubscribes folder.
Subscribes/unsubscribes folder.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Full name of folder to subscribe/unsubscribe.
|
$SetAction |
Indicates if folder should be subscribed or unsubscribed.
|
Throws
|
#
|
public
|
UpdateFoldersOrder(int $AccountID, array $FolderList): boolean
Updates order of folders.
Updates order of folders.
Parameters
$AccountID |
Account identifier.
|
$FolderList |
List of folders with new order.
|
Throws
|
#
|
public
|
ClearFolder(int $AccountID, string $Folder): boolean
Removes all messages from folder. Method is used for Trash and Spam folders.
Removes all messages from folder. Method is used for Trash and Spam folders.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
Throws
|
#
|
public
|
GetMessagesByUids(int $AccountID, string $Folder, array $Uids): array
Obtains message list for specified messages' uids.
Obtains message list for specified messages' uids.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Uids |
Uids of messages to obtain.
|
Throws
|
#
|
public
|
GetMessagesFlags(int $AccountID, string $Folder, array $Uids): array
Obtains infomation about flagged flags for specified messages.
Obtains infomation about flagged flags for specified messages.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$Uids |
Uids of messages.
|
Throws
|
#
|
public
|
SaveMessage(
int $AccountID,
int $Fetcher = null,
int $Alias = null,
int $IdentityID = 0,
array $DraftInfo = [],
string $DraftUid = "",
string $To = "",
string $Cc = "",
string $Bcc = "",
string $Subject = "",
string $Text = "",
boolean $IsHtml = false,
int $Importance = MessagePriority::NORMAL,
boolean $SendReadingConfirmation = false,
array $Attachments = [],
string $InReplyTo = "",
string $References = "",
int $Sensitivity = Sensitivity::NOTHING,
string $DraftFolder = "",
): boolean
Saves message to Drafts folder.
Saves message to Drafts folder.
Parameters
$AccountID |
Account identifier.
|
$Fetcher |
Fetcher object is filled in by subscription. Webclient sends FetcherID parameter.
|
$Alias |
Alias object is filled in by subscription. Webclient sends AliasID parameter.
|
$IdentityID |
Identity identifier.
|
$DraftInfo |
Contains information about the original message which is replied or forwarded: message type (reply/forward), UID and folder.
|
$DraftUid |
Uid of message to save in Drafts folder.
|
$To |
Message recipients.
|
$Cc |
Recipients which will get a copy of the message.
|
$Bcc |
Recipients which will get a hidden copy of the message.
|
$Subject |
Subject of the message.
|
$Text |
Text of the message.
|
$IsHtml |
Indicates if text of the message is HTML or plain.
|
$Importance |
Importance of the message - LOW = 5, NORMAL = 3, HIGH = 1.
|
$SendReadingConfirmation |
Indicates if it is necessary to include header that says
|
$Attachments |
List of attachments.
|
$InReplyTo |
Value of In-Reply-To header which is supplied in replies/forwards and contains Message-ID of the original message. This approach allows for organizing threads.
|
$References |
Content of References header block of the message.
|
$Sensitivity |
Sensitivity header for the message, its value will be returned: 1 for "Confidential", 2 for "Private", 3 for "Personal".
|
$DraftFolder |
Full name of Drafts folder.
|
Throws
System\Exceptions\AuroraApiException |
|
|
#
|
public
|
SendMessage(
int $AccountID,
int $Fetcher = null,
int $Alias = null,
int $IdentityID = 0,
array $DraftInfo = [],
string $DraftUid = "",
string $To = "",
string $Cc = "",
string $Bcc = "",
array $Recipients = [],
string $Subject = "",
string $Text = "",
boolean $IsHtml = false,
int $Importance = MessagePriority::NORMAL,
boolean $SendReadingConfirmation = false,
array $Attachments = [],
string $InReplyTo = "",
string $References = "",
int $Sensitivity = Sensitivity::NOTHING,
string $SentFolder = "",
string $DraftFolder = "",
string $ConfirmFolder = "",
string $ConfirmUid = "",
array $CustomHeaders = [],
): boolean
Sends message.
Parameters
$AccountID |
Account identifier.
|
$Fetcher |
Fetcher object is filled in by subscription. Webclient sends FetcherID parameter.
|
$Alias |
Alias object is filled in by subscription. Webclient sends AliasID parameter.
|
$IdentityID |
Identity identifier.
|
$DraftInfo |
Contains information about the original message which is replied or forwarded: message type (reply/forward), UID and folder.
|
$DraftUid |
Uid of message to save in Drafts folder.
|
$To |
Message recipients.
|
$Cc |
Recipients which will get a copy of the message.
|
$Bcc |
Recipients which will get a hidden copy of the message.
|
$Recipients |
Recipients that will be used to send messages through the SMTP. Use this parameter if you want real recipients to differ from those specified in the message body (To, CC, BCC).
|
$Subject |
Subject of the message.
|
$Text |
Text of the message.
|
$IsHtml |
Indicates if text of the message is HTML or plain.
|
$Importance |
Importance of the message - LOW = 5, NORMAL = 3, HIGH = 1.
|
$SendReadingConfirmation |
Indicates if it is necessary to include header that says
|
$Attachments |
List of attachments.
|
$InReplyTo |
Value of In-Reply-To header which is supplied in replies/forwards and contains Message-ID of the original message. This approach allows for organizing threads.
|
$References |
Content of References header block of the message.
|
$Sensitivity |
Sensitivity header for the message, its value will be returned: 1 for "Confidential", 2 for "Private", 3 for "Personal".
|
$SentFolder |
Full name of Sent folder.
|
$DraftFolder |
Full name of Drafts folder.
|
$ConfirmFolder |
Full name of folder that contains a message that should be marked as confirmed read.
|
$ConfirmUid |
Uid of message that should be marked as confirmed read.
|
$CustomHeaders |
list of custom headers
|
Throws
System\Exceptions\AuroraApiException |
|
|
#
|
public
|
SetupSystemFolders(int $AccountID, string $Sent, string $Drafts, string $Trash, string $Spam): boolean
Sets up new values of special folders.
Sets up new values of special folders.
Parameters
$AccountID |
Account identifier.
|
$Sent |
New value of Sent folder full name.
|
$Drafts |
New value of Drafts folder full name.
|
$Trash |
New value of Trash folder full name.
|
$Spam |
New value of Spam folder full name.
|
|
#
|
public
|
SetAlwaysRefreshFolder(int $AccountID, string $FolderFullName, bool $AlwaysRefresh): boolean
Parameters
$AccountID |
Account identifier.
|
$FolderFullName |
folder full name.
|
|
#
|
public
|
SetTemplateFolderType(int $AccountID, string $FolderFullName, boolean $SetTemplate): boolean
Marks (or unmarks) folder as template folder.
Marks (or unmarks) folder as template folder.
Parameters
$AccountID |
Account identifier.
|
$FolderFullName |
Full name of folder that should be marked/unmarked as template.
|
$SetTemplate |
Indicates if template should be set or unset.
|
|
#
|
public
|
SetEmailSafety(int $AccountID, string $Email): boolean
Marks sender email as safety for authenticated user. So pictures in messages from this sender will be always displayed.
Marks sender email as safety for authenticated user. So pictures in messages from this sender will be always displayed.
Parameters
$AccountID |
Account identifier.
|
$Email |
Sender email.
|
Throws
|
#
|
public
|
CreateIdentity(int $UserId, int $AccountID, string $FriendlyName, string $Email): int|boolean
Creates identity.
Parameters
$UserId |
User identifier.
|
$AccountID |
Account identifier.
|
$FriendlyName |
Identity friendly name.
|
$Email |
Identity email.
|
|
#
|
public
|
UpdateIdentity(
int $UserId,
int $AccountID,
$EntityId,
string $FriendlyName,
string $Email,
boolean $Default = false,
boolean $AccountPart = false,
): boolean
Updates identity.
Parameters
$UserId |
User identifier.
|
$AccountID |
Account identifier.
|
$FriendlyName |
New value of identity friendly name.
|
$Email |
New value of identity email.
|
$Default |
Indicates if identity should be used by default.
|
$AccountPart |
Indicated if account should be updated, not any identity.
|
|
#
|
public
|
DeleteIdentity($AccountID, int $EntityId): boolean
Deletes identity.
Parameters
$EntityId |
Identity identifier.
|
|
#
|
public
|
GetIdentities(int $UserId): array|false
Obtains all identities of specified user.
Obtains all identities of specified user.
Parameters
|
#
|
public
|
UpdateSignature(int $AccountID, boolean $UseSignature = null, string $Signature = null, int $IdentityId = null): boolean
Updates signature.
Parameters
$AccountID |
Account identifier.
|
$UseSignature |
Indicates if signature should be used in outgoing mails.
|
$Signature |
Account or identity signature.
|
$IdentityId |
Identity identifier.
|
Throws
|
#
|
public
|
UploadAttachment(int $UserId, int $AccountID, array $UploadData): array
Uploads attachment.
Parameters
$UserId |
User identifier.
|
$AccountID |
Account identifier.
|
$UploadData |
Information about uploaded file.
|
|
#
|
public
|
SaveAttachmentsAsTempFiles(int $AccountID, array $Attachments = []): array|boolean
Retrieves attachments from message and saves them as files in temporary folder.
Retrieves attachments from message and saves them as files in temporary folder.
Parameters
$AccountID |
Account identifier.
|
$Attachments |
List of attachments hashes.
|
Throws
|
#
|
public
|
SaveMessageAsTempFile(int $AccountID, string $MessageFolder, string $MessageUid, string $FileName): array|boolean
Retrieves message and saves it as .eml file in temporary folder.
Retrieves message and saves it as .eml file in temporary folder.
Parameters
$AccountID |
Account identifier.
|
$MessageFolder |
Full name of folder.
|
$MessageUid |
Message uid.
|
$FileName |
Name of created .eml file.
|
Throws
|
#
|
public
|
UploadMessage(int $AccountID, string $Folder, array $UploadData): boolean
Uploads message and puts it to specified folder.
Uploads message and puts it to specified folder.
Parameters
$AccountID |
Account identifier.
|
$Folder |
Folder full name.
|
$UploadData |
Information about uploaded .eml file.
|
Throws
ProjectCore\Exceptions\ClientException |
|
|
#
|
public
|
ChangePassword(int $AccountId, string $CurrentPassword, string $NewPassword): boolean
This method will trigger some event, subscribers of which perform all change password process
This method will trigger some event, subscribers of which perform all change password process
Parameters
$AccountId |
Account identifier.
|
$CurrentPassword |
Current password.
|
$NewPassword |
New password.
|
|
#
|
public
|
GetFilters(int $AccountID): array|boolean
Obtains filters for specified account.
Obtains filters for specified account.
Parameters
$AccountID |
Account identifier.
|
|
#
|
public
|
UpdateFilters(int $AccountID, array $Filters): boolean
Updates filters.
Parameters
$AccountID |
Account identifier
|
$Filters |
New filters data.
|
|
#
|
public
|
GetForward(int $AccountID): array|boolean
Obtains forward data for specified account.
Obtains forward data for specified account.
Parameters
$AccountID |
Account identifier.
|
|
#
|
public
|
UpdateForward(int $AccountID, boolean $Enable = false, string $Email = ""): boolean
Updates forward.
Parameters
$AccountID |
Account identifier.
|
$Enable |
Indicates if forward is enabled.
|
$Email |
Email that should be used for message forward.
|
|
#
|
public
|
GetAutoresponder(int $AccountID): array|boolean
Obtains autoresponder for specified account.
Obtains autoresponder for specified account.
Parameters
$AccountID |
Account identifier.
|
|
#
|
public
|
UpdateAutoresponder(int $AccountID, boolean $Enable = false, string $Subject = "", string $Message = ""): boolean
Updates autoresponder data.
Updates autoresponder data.
Parameters
$AccountID |
Account identifier.
|
$Enable |
Indicates if autoresponder is enabled.
|
$Subject |
Subject of auto-respond message.
|
$Message |
Text of auto-respond message.
|
|
#
|
public
|
SetAccountSpamSettings($AccountID, $SpamScore, $AllowList, $BlockList)
|
#
|
public
|
GetAccountSpamSettings($AccountID)
|
#
|
public
|
AddEmailToAllowList($AccountID, $Email)
|
#
|
public
|
AddEmailToBlockList($AccountID, $Email)
|
#
|
public
|
onBeforeDeleteUser(array $aArgs, int &$mResult)
Deletes all mail accounts which are belonged to the specified user.
Called from subscribed event.
Deletes all mail accounts which are belonged to the specified user.
Called from subscribed event.
Parameters
$mResult |
User identifier.
|
|
#
|
public
|
onAfterDeleteUser($aArgs, &$mResult)
|
#
|
public
|
GetMailServerByDomain(string $Domain, bool $AllowWildcardDomain = false): array
Obtains a server object for the specified domain.
Obtains a server object for the specified domain.
Parameters
$AllowWildcardDomain |
the parameter indicates whether the wildcard server should be returned if no servers found
|
|
#
|
public
|
onLogin(array $aArgs, array|boolean &$mResult): boolean
Attempts to authorize user via mail account with specified credentials.
Called from subscribed event.
Attempts to authorize user via mail account with specified credentials.
Called from subscribed event.
Parameters
$aArgs |
Credentials.
|
$mResult |
List of results values.
|
|
#
|
public
|
onGetAccounts(array $aArgs, array &$aResult)
|
#
|
public
|
BuildMessage(
MailAccount $oAccount,
string $sTo = '',
string $sCc = '',
string $sBcc = '',
string $sSubject = '',
boolean $bTextIsHtml = false,
string $sText = '',
array $aAttachments = null,
array $aDraftInfo = null,
string $sInReplyTo = '',
string $sReferences = '',
int $iImportance = '',
int $iSensitivity = 0,
boolean $bSendReadingConfirmation = false,
object $oFetcher = null,
object $oAlias = null,
boolean $bWithDraftInfo = true,
Identity $oIdentity = null,
array $aCustomHeaders = [],
): Message
Builds message for further sending or saving.
Builds message for further sending or saving.
Parameters
$sTo |
Message recipients.
|
$sCc |
Recipients which will get a copy of the message.
|
$sBcc |
Recipients which will get a hidden copy of the message.
|
$sSubject |
Subject of the message.
|
$bTextIsHtml |
Indicates if text of the message is HTML or plain.
|
$sText |
Text of the message.
|
$aAttachments |
List of attachments.
|
$aDraftInfo |
Contains information about the original message which is replied or forwarded: message type (reply/forward), UID and folder.
|
$sInReplyTo |
Value of In-Reply-To header which is supplied in replies/forwards and contains Message-ID of the original message. This approach allows for organizing threads.
|
$sReferences |
Content of References header block of the message.
|
$iImportance |
Importance of the message - LOW = 5, NORMAL = 3, HIGH = 1.
|
$iSensitivity |
Sensitivity header for the message, its value will be returned: 1 for "Confidential", 2 for "Private", 3 for "Personal".
|
$bSendReadingConfirmation |
Indicates if it is necessary to include header that says
|
|
#
|
public
|
onAfterDeleteTenant(&$aArgs, &$mResult)
|
#
|
public
|
onAfterGetAutodiscover(&$aArgs, &$mResult)
|
#
|
public
|
EntryMessageNewtab()
|
#
|
public
|
EntryDownloadAttachment()
|
#
|
public
|
onBeforeRunEntry(&$aArguments, &$aResult)
|
#
|
public
|
EntryDownloadAttachmentCookieless()
|
#
|
public
|
onGetDigestHash($aArgs, &$mResult)
|
#
|
public
|
onGetAccountUsedToAuthorize($aArgs, &$mResult)
|
#
|
public
|
onCastExtendedProp($aArgs, &$mValue)
|
#
|
public
|
GetServerDomains($ServerId, $TenantId)
|
#
|
public
|
IsEmailAllowedForCreation($Email)
|
#
|