Skip to main content

Interface IEMailAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
Email connection, reading, sending <p></p> <b>Online Restricted:</b> This agent is not available in Online by default. Access must be requested specifically when app is registered.

Implements

IAgentBase, IDisposable

Methods

AuthenticateAsync(EMailConnectionInfoExtended, RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfoExtended EMailConnectionInfoExtended requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt;

AuthenticateIncomingAsync(EMailConnectionInfo, RequestOptions)

Authenticate against a mail-server to retrieve e-mails from <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; True if authentication was succcesfull

AuthenticateOutgoingAsync(EMailConnectionInfo, RequestOptions)

Authenticate against a mail server to send items with <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; True if authentication was succcesfull

CacheFolderListAsync(RequestOptions)

Fetch list of folders from email server for the current account, and cache in DB <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailFolder[]&gt; List of folders from mail server

CreateDefaultEMailAccountAsync(RequestOptions)

Set default values into a new EMailAccount. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAccount&gt; A blank EMailAccount

CreateDefaultEMailAddressAsync(RequestOptions)

Set default values into a new EMailAddress. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAddress&gt; A blank EMailAddress

CreateDefaultEMailAppointmentAsync(RequestOptions)

Set default values into a new EMailAppointment. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAppointment&gt; A blank EMailAppointment

CreateDefaultEMailAttachmentAsync(RequestOptions)

Set default values into a new EMailAttachment. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; A blank EMailAttachment

CreateDefaultEMailConnectionInfoAsync(RequestOptions)

Set default values into a new EMailConnectionInfo. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailConnectionInfo&gt; A blank EMailConnectionInfo

CreateDefaultEMailConnectionInfoExtendedAsync(RequestOptions)

Set default values into a new EMailConnectionInfoExtended. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailConnectionInfoExtended&gt; A blank EMailConnectionInfoExtended

CreateDefaultEMailCustomHeaderAsync(RequestOptions)

Set default values into a new EMailCustomHeader. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailCustomHeader&gt; A blank EMailCustomHeader

CreateDefaultEMailEntityAsync(RequestOptions)

Set default values into a new EMailEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; A blank EMailEntity

CreateDefaultEMailEnvelopeAsync(RequestOptions)

Set default values into a new EMailEnvelope. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEnvelope&gt; A blank EMailEnvelope

CreateDefaultEMailFolderAsync(RequestOptions)

Set default values into a new EMailFolder. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailFolder&gt; A blank EMailFolder

CreateDefaultEMailSOInfoAsync(RequestOptions)

Set default values into a new EMailSOInfo. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailSOInfo&gt; A blank EMailSOInfo

CreateEMailFromDocumentEntityAsync(DocumentEntity, RequestOptions)

Get an e-mail based on the provided DocumentEntity <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentEntity DocumentEntity DocumentEntity data requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

CreateEMailFromMimeMessageAsync(string, RequestOptions)

Get an e-mail based on the provided MIME-message <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mimeMessage string string representing a MIME-formatted message requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

CreateFolderAsync(EMailConnectionInfo, RequestOptions)

Create a new folder on the server <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

CreateForwardEmailAsync(EMailEntity, RequestOptions)

Create forward email <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

email EMailEntity The e-mail to forward requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The new forward email entity

CreateInlineHtmlHeaderAsync(EMailEntity, RequestOptions)

Create Outlook style HTML header to use in for instance reply entities and when printing <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

email EMailEntity The e-mail to generate header based on requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; The generated HTML header

CreateNewPhysicalDocumentFromEmailAsync(int, int, RequestOptions)

Save the Email from the server as a document file connected to existing document <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentId int The document ID int the DB emailItemId int The emails ID in the DB requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentEntity&gt; The document

CreateNewPhysicalDocumentFromEmailAttachmentAsync(int, int, string, RequestOptions)

Save the Email from the server as a document file connected to existing document <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentId int The document ID int the DB emailItemId int The emails ID int the DB attachmentId string Id string of the attachment requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentEntity&gt; The document

DeleteAsync(EMailConnectionInfo, int[], string, RequestOptions)

Delete specified mail items <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds int[] The e-mails to handle moveToFolder string If set, move deleted items to this folder requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

DeleteEMailAccountAsync(int, RequestOptions)

Deletes the EMailAccount <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

eMailAccountId int The identity of the EMailAccount requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

DeleteEmailsAsync(int[], string, RequestOptions)

Delete specified mail items and optionally move to the specified folder <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

ids int[] The e-mails to handle moveToFolder string If set, move deleted items to this folder requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

DeleteExtendedAsync(EMailConnectionInfoExtended, string[], RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfoExtended EMailConnectionInfoExtended messageIds string[] requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

DeleteFolderAsync(EMailConnectionInfo, RequestOptions)

Delete a folder from the server <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

DeleteFromServerIdentifierAsync(EMailConnectionInfo, string[], string, RequestOptions)

Delete specified mail items <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds string[] The e-mails to handle moveToFolder string If set, move deleted items to this folder requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

EmptyFolderAsync(EMailConnectionInfo, string, RequestOptions)

Delete all items in folder specified in the connection object <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver moveToFolder string If set, move deleted items to this folder requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

FindAddressAsync(string, RequestOptions)

Search for contacts and persons with the specified e-mail address (exact match on the email address string required) <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

address string E-mail address to look for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAddress[]&gt; All resolved contacts/persons

FindContactOrPersonByEmailNameAsync(string, string, RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

name string The sender name emailAddress string The sender email address requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ContactOrPersonFromEmail[]&gt; Contacts and persons matching emailaddress and name

FindContactOrPersonByEmailNameWithLimitAsync(string, string, int, int, RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

name string The sender name emailAddress string The sender email address numberOfContacts int Maximum returned number of contacts numberOfPersons int Maximum returned number of persons requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ContactOrPersonFromEmail[]&gt; Contacts and persons matching emailaddress and name

GetAttachmentAsync(EMailConnectionInfo, int, string, RequestOptions)

Retrieve an attachment from an e-mail <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerId int Unique ID for the e-mail to retrieve the attachment from attachmentId string Id of the attachment in the e-mail requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; The attachment

GetAttachmentFromIdAsync(int, string, RequestOptions)

Retrieve an attachment from an e-mail <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mailItemId int Unique ID for the e-mail to retrieve the attachment from attachmentId string Id of the attachment in the e-mail requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; The attachment

GetAttachmentFromServerIdentifierAsync(EMailConnectionInfo, string, string, RequestOptions)

Retrieve an attachment from an e-mail <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerId string Unique ID for the e-mail to retrieve the attachment from attachmentId string Id of the attachment in the e-mail requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; The attachment

GetCurrentAccountAsync(RequestOptions)

Get current account (last logged into should normally be current) for logged in associate <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAccount&gt; Id of current account

GetCurrentAccountIdAsync(RequestOptions)

Get current accountId (last logged into should normally be current) for logged in associate <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Id of current account

GetEMailAccountAsync(int, RequestOptions)

Gets a specific EMailAccount object. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

eMailAccountId int The identifier of the EMailAccount object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAccount&gt; EMailAccount

GetEMailAccountFromEMailAddressAsync(string, RequestOptions)

Returns the email account corresponding to this email address (for the current associate). <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

fromAddress string The address associated with this email account requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAccount&gt; Found or empty email account

GetEMailAddressesAsync(int[], RequestOptions)

Get information about one or more email addresses, identified by IDs <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailIds int[] Array of IDs from the email table, each identifying one email address requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAddress[]&gt; Array of email information objects

GetEMailAsEmlStreamAsync(int, bool, string, RequestOptions)

Get an inbox e-mail (by its EmailItemId) serialized as an Outlook-openable RFC822 (.eml) stream. Works for both IMAP and Graph/Exchange-Online mailboxes because it serializes the loaded entity instead of re-fetching the raw message by server id. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailItemId int The EmailItemId of the e-mail to retrieve as stream includeAttachments bool Should attachments be included in the stream returnContentType string Accept content-type. Default “application/octet-stream”. Could also be “application/pdf”, “text/plain”, “text/html”, or “multipart/related” requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<byte[]&gt; Get an inbox e-mail (by its EmailItemId) serialized as an Outlook-openable RFC822 (.eml) stream

GetEMailAsStreamAsync(EMailConnectionInfo, int, bool, string, RequestOptions)

Retrieve an e-mail optionally stripping attachments as a stream <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerId int Unique ID for the e-mail to retrieve stripAttachments bool If true, do not include attachments in stream returnContentType string Accept content-type. Default “application/octet-stream”. Could also be “application/pdf”, “text/plain”, “text/html”, or “multipart/related” requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<byte[]&gt; The attachment as a stream

GetEMailAsStreamFromServerIdentifierAsync(EMailConnectionInfo, string, bool, string, RequestOptions)

Retrieve an e-mail optionally stripping attachments as a stream <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerId string Unique ID for the e-mail to retrieve stripAttachments bool If true, do not include attachments in stream returnContentType string Accept content-type. Default “application/octet-stream”. Could also be “application/pdf”, “text/plain”, “text/html”, or “multipart/related” requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<byte[]&gt; The attachment as a stream

GetEMailAsync(int, bool, RequestOptions)

Get en e-mail based on its primary key in the DB <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

id int The primary key of the email row in the DB includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetEMailEnvelopesAsync(EMailConnectionInfo, int[], RequestOptions)

Retrieve a set of e-mail envelopes <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds int[] Unique identitifiers for the e-mails to retrieve envelopes for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEnvelope[]&gt; The e-mail envelope objects

GetEMailEnvelopesFromServerIdsAsync(EMailConnectionInfo, string[], RequestOptions)

Retrieve a set of e-mail envelopes <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds string[] Unique identitifiers for the e-mails to retrieve envelopes for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEnvelope[]&gt; The e-mail envelope objects

GetEMailFromAttachmentIdAsync(int, string[], bool, RequestOptions)

Get an e-mail based on an email and attachment id <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailId int The primary key of the email row in the DB attachmentIds string[] Id of the attachment. If multiple elements this is treated as attachment in attachemnts, e.g. [1, 2] means attachment 2 in attachment 1 of email. includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The attachment as an e-mail

GetEMailFromDocumentAttachmentIdAsync(int, string[], bool, RequestOptions)

Get an e-mail based on an email in the archive system and attachment id <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

docId int The primary key of the document row in the DB attachmentIds string[] Id of the attachment. If multiple elements this is treated as attachment in attachemnts, e.g. [1, 2] means attachment 2 in attachment 1 of email. includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The attachment as an e-mail

GetEMailFromDocumentIdAsync(int, RequestOptions)

Get an e-mail based on an archived document <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentId int Unique id of the document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetEMailFromDocumentIdWithoutAttachmentStreamAsync(int, RequestOptions)

Get an e-mail based on an archived document <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentId int Unique id of the document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetEMailFromIdAsync(EMailConnectionInfo, int, bool, EMailFlags, bool, RequestOptions)

Get en e-mail based on its unique id <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerId int Unique ID for the e-mail to retrieve lookupAddresses bool If true try to look up e-mail addresses in from/to/cc/bcc fields against superoffice contacts flags EMailFlags Any flags to apply to the fetched item. Ex: Seen/Answered includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetEMailFromServerIdentifierAsync(EMailConnectionInfo, string, bool, EMailFlags, bool, RequestOptions)

Get en e-mail based on its unique id string <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerId string Unique ID for the e-mail to retrieve lookupAddresses bool If true try to look up e-mail addresses in from/to/cc/bcc fields against superoffice contacts flags EMailFlags Any flags to apply to the fetched item. Ex: Seen/Answered includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetEMailFromTempAsync(string, RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

fileName string requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt;

GetEMailSOInfoAsync(int, RequestOptions)

Gets a specific EMailSOInfo object. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

eMailSOInfoId int The identifier of the EMailSOInfo object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailSOInfo&gt; EMailSOInfo

GetEmailAppointmentAsync(int, RequestOptions)

Get appointment data contained in the emails iCal attachment <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mailItemId int Id identifying the email requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAppointment&gt; Appointment data

GetEmailAppointmentRecurrenceAsync(int, RequestOptions)

Get recurrence data contained in the email iCal attachment <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mailItemId int Id identifying the email requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<RecurrenceInfo&gt; Recurrence information

GetEmailDocumentAsMimeStreamAsync(int, string, RequestOptions)

Gets a particular document, and tries to parse it, and returns it in MIME/RFC822 format. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentId int SuperOffice document ID returnContentType string Accept content-type. Default “application/octet-stream”. Could also be “application/pdf”, “text/plain”, “text/html”, or “multipart/related” requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<byte[]&gt; A document-stream representing the document in MIME/RFC822 format.

GetEmailMessageIdsAsync(EMailConnectionInfoExtended, RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfoExtended EMailConnectionInfoExtended requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt;

GetEmailsAsStringAsync(EMailConnectionInfoExtended, string[], RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfoExtended EMailConnectionInfoExtended messageIds string[] requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt;

GetExtendedEmailMessageIdsAsync(EMailConnectionInfoExtended, RequestOptions)

Gets not only the Message-Id’s but also the UID’s and the uniquevalidity property in this format-> uvalidity:uid:MsgId - and this format should be understood by GetEmailsAsString() and DeleteExtended(). <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfoExtended EMailConnectionInfoExtended requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt;

GetFolderEMailCountAsync(EMailConnectionInfo, bool, RequestOptions)

Retrieve total/unread mail items in current folder <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver onlyUnread bool If true, only unread items are counted requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Number of mail items

GetFolderHasNewEMailAsync(EMailConnectionInfo, RequestOptions)

Check if folder has received new items since previous access. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; True if new mail is available.

GetFolderInfoAsync(EMailConnectionInfo, string[], RequestOptions)

Retrieve information about folders. If folders parameter is not specified(null), information about all subscribed folders will be returned. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver folders string[] Folders to get information about. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailFolder[]&gt; Folder information

GetFolderListAsync(EMailConnectionInfo, bool, RequestOptions)

Retrieve all folders for the mail account. String is separated in sections by the paragraph character. First section contains the folder delimeter char. Next is folder name. Additional sections may be unread and total items. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver includeItemCount bool If true, unread and total items are added to the foldername separated by a comma requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt; List of available folders as a string array

GetMailFromInReplyToAsync(string, RequestOptions)

Get email from db based on In-Reply-To Message Id <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

messageId string The message id requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; EMailEntity that is in reply to the provided messageId

GetMailFromMessageIdAsync(string, RequestOptions)

Get email from db based on Message Id <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

messageId string The message id requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; EMailEntity with the provided message id

GetNewMailAsync(int[], RequestOptions)

Get new email in folder(s) for current associate <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

folders int[] List of folder ids to check for new email requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEnvelope[]&gt; The downloaded email envelopes

GetParticipantInfoFromEmailAddressAsync(string, int, RequestOptions)

Get participant data associated with the participant in the emails iCal attachment <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailAddress string Email address of participant appointmentId int Appointment id of participant requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Person&gt; Person information

GetPersonEntitiesFromEmailAddressAsync(string, RequestOptions)

Get all persons and contacts with the given email address <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailAddress string The emailAddress to find persons and contacts for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PersonEntity[]&gt;

GetPersonsFromEmailAddressAsync(string, RequestOptions)

Get all persons and contacts with the given email address <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailAddress string The emailAddress to find persons and contacts for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Person[]&gt;

GetPreviewAttachmentFromDocIdAsync(int, string, RequestOptions)

Retrieve an attachment from an e-mail stored in the document archive. The returned data is intended to be use for a preview. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

docId int Unique ID for the e-mail in the document archive to retrieve the attachment from attachmentId string Id of the attachment in the e-mail requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; The attachment

GetPreviewAttachmentFromIdAsync(int, string, string, string, RequestOptions)

Retrieve an attachment from an e-mail. The returned data is intended to be use for a preview. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mailItemId int Unique ID for the e-mail to retrieve the attachment from attachmentId string Id of the attachment in the e-mail attachmentType string Mimetype of the attachment. Must be set if attachmentId contains a chain. attachmentFilename string Filename of the attachment. Must be set if attachmentId contains a chain. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; The attachment

GetReadySyncEmailAccountsAsync(RequestOptions)

Gets the list of SyncUserAccounts that should be synced, from mail server to SuperOffice database cache. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<SyncUserAccount[]&gt; List of accounts to sync

GetUnsanitizedEMailAsync(int, bool, RequestOptions)

Get en e-mail based on its primary key in the DB. The returned value is not sanitized. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

id int The primary key of the email row in the DB includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetUnsanitizedEMailFromAttachmentIdAsync(int, string[], bool, RequestOptions)

Get an e-mail based on an email and attachment id. The returned value is not sanitized. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailId int The primary key of the email row in the DB attachmentIds string[] Id of the attachment. If multiple elements this is treated as attachment in attachemnts, e.g. [1, 2] means attachment 2 in attachment 1 of email. includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The attachment as an e-mail

GetUnsanitizedEMailFromDocumentAttachmentIdAsync(int, string[], bool, RequestOptions)

Get an e-mail based on an email in the archive system and attachment id. The returned value is not sanitized. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

docId int The primary key of the document row in the DB attachmentIds string[] Id of the attachment. If multiple elements this is treated as attachment in attachemnts, e.g. [1, 2] means attachment 2 in attachment 1 of email. includeAttachments bool Should we retrieve attachments embedded in the e-mail from the server requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The attachment as an e-mail

GetUnsanitizedEMailFromDocumentIdAsync(int, RequestOptions)

Get an e-mail based on an archived document. The returned value is not sanitized. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentId int Unique id of the document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetUnsanitizedEMailFromDocumentIdWithoutAttachmentStreamAsync(int, RequestOptions)

Get an e-mail based on an archived document. The returned value is not sanitized. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

documentId int Unique id of the document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The e-mail

GetUnsanitizedPreviewAttachmentFromDocIdAsync(int, string, RequestOptions)

Retrieve an attachment from an e-mail stored in the document archive. The returned data is intended to be use for a preview. The returned data is not sanitized. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

docId int Unique ID for the e-mail in the document archive to retrieve the attachment from attachmentId string Id of the attachment in the e-mail requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; The attachment

GetUnsanitizedPreviewAttachmentFromIdAsync(int, string, string, string, RequestOptions)

Retrieve an attachment from an e-mail. The returned data is intended to be use for a preview. The returned data is not sanitized. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mailItemId int Unique ID for the e-mail to retrieve the attachment from attachmentId string Id of the attachment in the e-mail attachmentType string Mimetype of the attachment. Must be set if attachmentId contains a chain. attachmentFilename string Filename of the attachment. Must be set if attachmentId contains a chain. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAttachment&gt; The attachment

HasMXRecordAsync(string, RequestOptions)

Return true if there is one or more MX records in DNS for the given mail domain <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mailDomain string The mail domain to check. Normally this is the part after @ in an email address requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; True if there is at least one MX record

HasNewMailAsync(int, int, RequestOptions)

Fast check for new mail in the database <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

mailItemId int The last known mailitemid folderId int The folderId for the folder to check for new mail requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; Has new mail if true

HasSPFRecordAsync(string, string, RequestOptions)

Return true if target domain contains a SPF record which is under the given SPF record <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

sourceSpf string The SPF to match from targetDomain string The domain to verify if it has at least one SPF record contained in the source SPF requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; True if a match is found

LatestItemIdByFolderAsync(int, RequestOptions)

Returns the latest id of the mail item by folder <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

folderId int The folderId for the folder to check for the latest mail id requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Mail Item id

MarkAsReadAsync(EMailConnectionInfo, int[], bool, RequestOptions)

Mark one or more e-mails as (un)read <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds int[] The e-mails to handle read bool If true mails are marked as read. If false mails are marked as unread. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

MarkAsReadFromServerIdentifiersAsync(EMailConnectionInfo, string[], bool, RequestOptions)

Mark one or more e-mails as (un)read <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds string[] The e-mails to handle read bool If true mails are marked as read. If false mails are marked as unread. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

MarkEmailsAsReadAsync(int[], bool, RequestOptions)

Mark one or more e-mails as (un)read <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

ids int[] The e-mails to handle read bool If true mails are marked as read. If false mails are marked as unread. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

MoveEmailsToFolderAsync(int, int[], RequestOptions)

Move one or more emails to the specified folder in the DB, and on the server <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

folderId int The EmailFolderId of the folder to move to emailItemIds int[] The emails to move requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

MoveEmailsToTrashAsync(int[], RequestOptions)

Delete specified mail items and move to the Trash folder <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

ids int[] The e-mails to handle requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

MoveToFolderAsync(EMailConnectionInfo, int[], string, RequestOptions)

Moved specified items from current folder to targetFolder <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds int[] The e-mails to handle targetFolder string Name of folder to move items to requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

MoveToFolderFromServerIdentifierAsync(EMailConnectionInfo, string[], string, RequestOptions)

Moved specified items from current folder to targetFolder <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver messageServerIds string[] The e-mails to handle targetFolder string Name of folder to move items to requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

RefreshFolderAsync(EMailConnectionInfo, string[], RequestOptions)

Refresh the given folders - i.e., fetch data from the mail server and update the in-database cache. This may happen synchronously or as a batch task, the return value will be 0 if the processing was synchronous, or the batch task id if a batch task is used. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo Email connection info credentials folders string[] List of folder names to refresh requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Batch task id, or 0 if the processing was synchronous

RefreshFolderForAssociateAsync(string[], RequestOptions)

Get all emails in folder(s) from current associate <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

folders string[] List of folder names to refresh requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; JSON serialized string containing array of data about each folder

RelayMessageAsync(EMailConnectionInfoExtended, string, string, string[], RequestOptions)

<p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfoExtended EMailConnectionInfoExtended rfc822 string from string recipients string[] requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

ResolveEMailRecipientsAsync(string, RequestOptions)

Resolve separate emails from single string. Also lookup persons by emails. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emailAddress string The string to lookup emails from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAddress[]&gt; Resolved EMail recipients

SaveAsync(EMailEntity, RequestOptions)

Save the e-mail back to the database <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

email EMailEntity The e-mail to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The updated saved entity

SaveDraftAsync(EMailEntity, RequestOptions)

Save the Email entity to the drafts folder <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

entity EMailEntity The entity to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The saved e-mail entity

SaveEMailAccountAsync(EMailAccount, RequestOptions)

Updates the existing EMailAccount or creates a new EMailAccount if the id parameter is 0. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

eMailAccount EMailAccount The EMailAccount that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailAccount&gt; New or updated EMailAccount

SaveEMailAsync(EMailConnectionInfo, EMailEntity, RequestOptions)

Save the passed e-mail back to the server <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver email EMailEntity The e-mail to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The updated saved entity

SaveEmailToTmpDocumentAsync(EMailEntity, int, bool, RequestOptions)

Save the Email as a tmp document ready to archive <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

email EMailEntity The e-mail to save folderId int The folder id where the email is stripAttachments bool If true, do not include attachments in tmp document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; Filename of the tmp document

SaveToMailServerAsync(EMailEntity, RequestOptions)

Save the passed e-mail back to the mail server <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

email EMailEntity The e-mail to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity&gt; The updated saved entity

SendAndSaveEmailToTmpDocumentAsync(EMailEntity, bool, RequestOptions)

Send the provided e-mail and create tmp document ready to archive <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

email EMailEntity The e-mail to send stripAttachments bool If true, do not include attachments in tmp document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; Filename of the tmp document

SendAsync(EMailEntity[], RequestOptions)

Send the provided e-mails <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

emails EMailEntity[] The e-mails to send requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity[]&gt; The sent e-mails (updated with message id etc.)

SendEMailsAsync(EMailConnectionInfo, EMailEntity[], EMailConnectionInfo, RequestOptions)

Send the provided e-mails <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

outgoingConnectionInfo EMailConnectionInfo All information needed to connect to the mailserver emails EMailEntity[] The e-mails to send sentItemsConnectionInfo EMailConnectionInfo If provided, save sent item(s) in the folder specified. May be null. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<EMailEntity[]&gt; The sent e-mails (updated with message id etc.)

SetRepliedAtAsync(string, RequestOptions)

Set the replied_at field based on the MessageID <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

messageId string The MessageID requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

SetSubscriptionAsync(EMailConnectionInfo, EMailFolder[], RequestOptions)

Set subscription on or off on a set of folders <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

connectionInfo EMailConnectionInfo All information needed to connect to the mailserver folders EMailFolder[] Folders to set subscription value on requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

SyncEmailAccountAsync(SyncUserAccount, RequestOptions)

Sync the given account, from mail server to SuperOffice database cache. This API has no throttling, so please be careful with multiple concurrent calls. Mail servers may become angry. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

syncUserAccount SyncUserAccount Account to sync requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task A void return

SyncEmailAccountsAsync(SyncUserAccount[], RequestOptions)

Start syncing of the given accounts, from mail server to SuperOffice database cache. Only one of these API calls may run at a time. If one is already active, we return after 1 (one) second, with no indication that the sync was not really started. This is a way to throttle sync’ing to avoid making the mail servers angry at us. <br/> There is an <b>additional</b> level of throttling within the implementation as well, limiting us to a maximum of 10 tasks, regardless of how many associates are to to be sync’ed. The outer, API-level lock is released when all those tasks are done. <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

syncUserAccounts SyncUserAccount[] Accounts to sync requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task A void return

TestAuthenticateAsync(RequestOptions)

Test if logged-in user has a working mail account <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt;

ToggleSubscriptionAsync(int, bool, RequestOptions)

Set subscription on or off on a set of folders <p></p> <b>Online Restricted:</b> The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

folderId int The folder id to set subscription value on subscriptionStatus bool The subscription status to set requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value