<a id=“SuperOffice_WebApi_Agents_IEMailAgent”></a> Interface IEMailAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: 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, IDisposableMethods
<a id=“SuperOffice_WebApi_Agents_IEMailAgent_AuthenticateAsync_SuperOffice_WebApi_Data_EMailConnectionInfoExtended_SuperOffice_WebApi_RequestOptions_”></a> 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><a id=“SuperOffice_WebApi_Agents_IEMailAgent_AuthenticateIncomingAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_RequestOptions_”></a> 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> True if authentication was succcesfull<a id=“SuperOffice_WebApi_Agents_IEMailAgent_AuthenticateOutgoingAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_RequestOptions_”></a> 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> True if authentication was succcesfull<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CacheFolderListAsync_SuperOffice_WebApi_RequestOptions_”></a> 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[]> List of folders from mail server<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailAccountAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailAccountAsync(RequestOptions)
Set default values into a new EMailAccount. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailAccount> A blank EMailAccount<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailAddressAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailAddressAsync(RequestOptions)
Set default values into a new EMailAddress. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailAddress> A blank EMailAddress<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailAppointmentAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailAppointmentAsync(RequestOptions)
Set default values into a new EMailAppointment. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailAppointment> A blank EMailAppointment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailAttachmentAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailAttachmentAsync(RequestOptions)
Set default values into a new EMailAttachment. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailAttachment> A blank EMailAttachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailConnectionInfoAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailConnectionInfoAsync(RequestOptions)
Set default values into a new EMailConnectionInfo. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailConnectionInfo> A blank EMailConnectionInfo<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailConnectionInfoExtendedAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailConnectionInfoExtendedAsync(RequestOptions)
Set default values into a new EMailConnectionInfoExtended. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailConnectionInfoExtended> A blank EMailConnectionInfoExtended<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailCustomHeaderAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailCustomHeaderAsync(RequestOptions)
Set default values into a new EMailCustomHeader. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailCustomHeader> A blank EMailCustomHeader<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailEntityAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailEntityAsync(RequestOptions)
Set default values into a new EMailEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailEntity> A blank EMailEntity<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailEnvelopeAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailEnvelopeAsync(RequestOptions)
Set default values into a new EMailEnvelope. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailEnvelope> A blank EMailEnvelope<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailFolderAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailFolderAsync(RequestOptions)
Set default values into a new EMailFolder. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailFolder> A blank EMailFolder<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateDefaultEMailSOInfoAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEMailSOInfoAsync(RequestOptions)
Set default values into a new EMailSOInfo. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EMailSOInfo> A blank EMailSOInfo<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateEMailFromDocumentEntityAsync_SuperOffice_WebApi_Data_DocumentEntity_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateEMailFromMimeMessageAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateFolderAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateForwardEmailAsync_SuperOffice_WebApi_Data_EMailEntity_SuperOffice_WebApi_RequestOptions_”></a> 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> The new forward email entity<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateInlineHtmlHeaderAsync_SuperOffice_WebApi_Data_EMailEntity_SuperOffice_WebApi_RequestOptions_”></a> 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> The generated HTML header<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateNewPhysicalDocumentFromEmailAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> The document<a id=“SuperOffice_WebApi_Agents_IEMailAgent_CreateNewPhysicalDocumentFromEmailAttachmentAsync_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The document<a id=“SuperOffice_WebApi_Agents_IEMailAgent_DeleteAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Int32___System_String_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_DeleteEMailAccountAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_DeleteEmailsAsync_System_Int32___System_String_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_DeleteExtendedAsync_SuperOffice_WebApi_Data_EMailConnectionInfoExtended_System_String___SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_DeleteFolderAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_DeleteFromServerIdentifierAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String___System_String_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_EmptyFolderAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_FindAddressAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]> All resolved contacts/persons<a id=“SuperOffice_WebApi_Agents_IEMailAgent_FindContactOrPersonByEmailNameAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]> Contacts and persons matching emailaddress and name<a id=“SuperOffice_WebApi_Agents_IEMailAgent_FindContactOrPersonByEmailNameWithLimitAsync_System_String_System_String_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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[]> Contacts and persons matching emailaddress and name<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetAttachmentAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetAttachmentFromIdAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetAttachmentFromServerIdentifierAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetCurrentAccountAsync_SuperOffice_WebApi_RequestOptions_”></a> 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> Id of current account<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetCurrentAccountIdAsync_SuperOffice_WebApi_RequestOptions_”></a> 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> Id of current account<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailAccountAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> EMailAccount<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailAccountFromEMailAddressAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> Found or empty email account<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailAddressesAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> 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[]> Array of email information objects<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailAsEmlStreamAsync_System_Int32_System_Boolean_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]> Get an inbox e-mail (by its EmailItemId) serialized as an Outlook-openable RFC822 (.eml) stream<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailAsStreamAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Int32_System_Boolean_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]> The attachment as a stream<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailAsStreamFromServerIdentifierAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String_System_Boolean_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]> The attachment as a stream<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailAsync_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailEnvelopesAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> 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[]> The e-mail envelope objects<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailEnvelopesFromServerIdsAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String___SuperOffice_WebApi_RequestOptions_”></a> 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[]> The e-mail envelope objects<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailFromAttachmentIdAsync_System_Int32_System_String___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment as an e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailFromDocumentAttachmentIdAsync_System_Int32_System_String___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment as an e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailFromDocumentIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailFromDocumentIdWithoutAttachmentStreamAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailFromIdAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Int32_System_Boolean_SuperOffice_WebApi_Data_EMailFlags_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailFromServerIdentifierAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String_System_Boolean_SuperOffice_WebApi_Data_EMailFlags_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailFromTempAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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><a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEMailSOInfoAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> EMailSOInfo<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEmailAppointmentAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> Appointment data<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEmailAppointmentRecurrenceAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> Recurrence information<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEmailDocumentAsMimeStreamAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]> A document-stream representing the document in MIME/RFC822 format.<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEmailMessageIdsAsync_SuperOffice_WebApi_Data_EMailConnectionInfoExtended_SuperOffice_WebApi_RequestOptions_”></a> 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[]><a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetEmailsAsStringAsync_SuperOffice_WebApi_Data_EMailConnectionInfoExtended_System_String___SuperOffice_WebApi_RequestOptions_”></a> 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[]><a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetExtendedEmailMessageIdsAsync_SuperOffice_WebApi_Data_EMailConnectionInfoExtended_SuperOffice_WebApi_RequestOptions_”></a> 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[]><a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetFolderEMailCountAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> Number of mail items<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetFolderHasNewEMailAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_RequestOptions_”></a> 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> True if new mail is available.<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetFolderInfoAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String___SuperOffice_WebApi_RequestOptions_”></a> 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[]> Folder information<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetFolderListAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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[]> List of available folders as a string array<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetMailFromInReplyToAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> EMailEntity that is in reply to the provided messageId<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetMailFromMessageIdAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> EMailEntity with the provided message id<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetNewMailAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> 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[]> The downloaded email envelopes<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetParticipantInfoFromEmailAddressAsync_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> Person information<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetPersonEntitiesFromEmailAddressAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]><a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetPersonsFromEmailAddressAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]><a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetPreviewAttachmentFromDocIdAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetPreviewAttachmentFromIdAsync_System_Int32_System_String_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetReadySyncEmailAccountsAsync_SuperOffice_WebApi_RequestOptions_”></a> 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[]> List of accounts to sync<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetUnsanitizedEMailAsync_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetUnsanitizedEMailFromAttachmentIdAsync_System_Int32_System_String___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment as an e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetUnsanitizedEMailFromDocumentAttachmentIdAsync_System_Int32_System_String___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment as an e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetUnsanitizedEMailFromDocumentIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetUnsanitizedEMailFromDocumentIdWithoutAttachmentStreamAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> The e-mail<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetUnsanitizedPreviewAttachmentFromDocIdAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_GetUnsanitizedPreviewAttachmentFromIdAsync_System_Int32_System_String_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> The attachment<a id=“SuperOffice_WebApi_Agents_IEMailAgent_HasMXRecordAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> True if there is at least one MX record<a id=“SuperOffice_WebApi_Agents_IEMailAgent_HasNewMailAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> Has new mail if true<a id=“SuperOffice_WebApi_Agents_IEMailAgent_HasSPFRecordAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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> True if a match is found<a id=“SuperOffice_WebApi_Agents_IEMailAgent_LatestItemIdByFolderAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> 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> Mail Item id<a id=“SuperOffice_WebApi_Agents_IEMailAgent_MarkAsReadAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Int32___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_MarkAsReadFromServerIdentifiersAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_MarkEmailsAsReadAsync_System_Int32___System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_MoveEmailsToFolderAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_MoveEmailsToTrashAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_MoveToFolderAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_Int32___System_String_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_MoveToFolderFromServerIdentifierAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String___System_String_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_RefreshFolderAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_System_String___SuperOffice_WebApi_RequestOptions_”></a> 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> Batch task id, or 0 if the processing was synchronous<a id=“SuperOffice_WebApi_Agents_IEMailAgent_RefreshFolderForAssociateAsync_System_String___SuperOffice_WebApi_RequestOptions_”></a> 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> JSON serialized string containing array of data about each folder<a id=“SuperOffice_WebApi_Agents_IEMailAgent_RelayMessageAsync_SuperOffice_WebApi_Data_EMailConnectionInfoExtended_System_String_System_String_System_String___SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_ResolveEMailRecipientsAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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[]> Resolved EMail recipients<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SaveAsync_SuperOffice_WebApi_Data_EMailEntity_SuperOffice_WebApi_RequestOptions_”></a> 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> The updated saved entity<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SaveDraftAsync_SuperOffice_WebApi_Data_EMailEntity_SuperOffice_WebApi_RequestOptions_”></a> 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> The saved e-mail entity<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SaveEMailAccountAsync_SuperOffice_WebApi_Data_EMailAccount_SuperOffice_WebApi_RequestOptions_”></a> 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> New or updated EMailAccount<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SaveEMailAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_Data_EMailEntity_SuperOffice_WebApi_RequestOptions_”></a> 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> The updated saved entity<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SaveEmailToTmpDocumentAsync_SuperOffice_WebApi_Data_EMailEntity_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> Filename of the tmp document<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SaveToMailServerAsync_SuperOffice_WebApi_Data_EMailEntity_SuperOffice_WebApi_RequestOptions_”></a> 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> The updated saved entity<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SendAndSaveEmailToTmpDocumentAsync_SuperOffice_WebApi_Data_EMailEntity_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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> Filename of the tmp document<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SendAsync_SuperOffice_WebApi_Data_EMailEntity___SuperOffice_WebApi_RequestOptions_”></a> 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[]> The sent e-mails (updated with message id etc.)<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SendEMailsAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_Data_EMailEntity___SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_RequestOptions_”></a> 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[]> The sent e-mails (updated with message id etc.)<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SetRepliedAtAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SetSubscriptionAsync_SuperOffice_WebApi_Data_EMailConnectionInfo_SuperOffice_WebApi_Data_EMailFolder___SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SyncEmailAccountAsync_SuperOffice_WebApi_Data_SyncUserAccount_SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_SyncEmailAccountsAsync_SuperOffice_WebApi_Data_SyncUserAccount___SuperOffice_WebApi_RequestOptions_”></a> 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<a id=“SuperOffice_WebApi_Agents_IEMailAgent_TestAuthenticateAsync_SuperOffice_WebApi_RequestOptions_”></a> 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><a id=“SuperOffice_WebApi_Agents_IEMailAgent_ToggleSubscriptionAsync_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> 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.