2.9.2 Messaging Methods

2.9.2.1 MsgGetStorage

MsgGetStorage
Returns information on the location where the message should be stored in Thru site.

FTHMsgStorageData
MsgGetStorage(Guid sessionID, string msgSubject, FTHAuxFileData[] auxFiles)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgSubject

If a message contains local attachments Thru server creates a subfolder under Outbox root. First 50 characters of subject are used and versioning is applied if needed.

auxFiles

List of auxiliary files to be added to the storage. The method will return a subset of these files in the FTHMsgStorageData result, within the MissingAuxFiles property. This subset will contain only the files that are missing in the server and, therefore, need to be uploaded.

2.9.2.2 MsgGetStorageByType

MsgGetStorageByType
Returns information on the location where the message should be stored in Thru site.

FTHMsgStorageData
MsgGetStorageByType(Guid sessionID, string msgSubject, FTHAuxFileData[] auxFiles, int type, string tag1, string tag2, string tag3)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgSubject

If a message contains local attachments Thru server creates a subfolder under Outbox root. First 50 characters of subject are used and versioning is applied if needed.

auxFiles

List of auxiliary files to be added to the storage. The method will return a subset of these files in the FTHMsgStorageData result, within the MissingAuxFiles property. This subset will contain only the files that are missing in the server and, therefore, need to be uploaded.

type

Type=0 creates storage under Outbox root in the same way as current function MsgGetStorage() by user email, timestamp and subject Type=1 always returns location Outbox/Projects/tag1/path-tree-similar-to-current-GetMsgStorage().

tag1

Tag to create subfolder for project name under Outbox/Projects

tag2

Reserved for future use

tag3

Reserved for future use

2.9.2.3 MsgCreate

MsgCreate
Create the message on the server. For thin clients like web browsers email is sent by the server, for thick email clients a link to secure distribution is returned. Link will replace original attachments.

FTHMsgData
MsgCreate (Guid sessionID, bool sendByClient, FTHMailPriority priority, string subject, string publicMessage, publicMessageIsHtml, string privateMessage, bool privateMessageIsHtml, bool requestLogin, DateTime dateExpired, bool notifyFlag, int maxDownloads, string[] toEmailList, string[] ccEmailList, string[] bccEmailList, int[] folderIDList, int[] fileIDList, int? auxFileSetID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

sendByClient

True if the client is responsible to send the mail. False if the server sends it.

priority

Message priority.

subject

Message subject.

publicMessage

Message body.

publicMessageIsHtml

Tells the server if public message body is in HTML format, reserved for future use

privateMessage

Private message body.

privateMessageIsHtml

Tells the server if private message body is in HTML format, reserved for future use

requestLogin

Whether the recipient will have to go through self password process.

dateExpired

Message expiration date.

notifyFlag

Flag that tells the server to send notifications when the files are downloaded or private message is read, ON by default.

maxDownloads

Maximal number of downloads for each file separately or as a package allowed to recipients. Value (-1) means unlimited downloads are allowed.

toEmailList

Array of To recipient list

ccEmailList

Array of Cc recipient list

bccEmailList

Array of Bcc recipient list

folderIDList

Array of attached folders

fileIDList

Array of attached files

auxFileSetID

Optional field linking message embedded images

2.9.2.4 MsgValidate

MsgValidate
Validate combination of parameters and policies for the email. Will return error and message with explanation if parameters/policies are incompatible.

FTHMsgValidationData
MsgValidate(Guid sessionID, bool sendByClient, FTHMailPriority priority, bool isPrivateMessage, bool requestLogin, DateTime dateExpired, bool notifyFlag, int maxDownloads, int recipientCount, bool isAttachments)

Parameter Name

Description

sessionID

User session returned by one of Open functions

sendByClient

True if the client is responsible to send the mail. False if the server sends it.

priority

Message priority.

isPrivateMessage

Indicates whether the message has a private message body.

requestLogin

Whether the recipient will have to go through self password process.

dateExpired

Message expiration date.

notifyFlag

Flag that tells the server to send notifications when the files are downloaded or private message is read, ON by default.

maxDownloads

Reserved for future use.

recipientCount

The total number of the message recipients.

isAttachments

Indicates whether the message contains (file or folder) attachments.

2.9.2.5 MsgDiscard

MsgDiscard
Discard message before it is sent. Discard deletes the message and attachments stored in in Thru site. Method should not be called after the message was sent since it invalidates the link to the files.

void MsgDiscard(Guid sessionID, int msgID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgID

Message identifier.

2.9.2.6 MsgComplete

MsgComplete
Mark message as complete after the message is discarded

void MsgComplete(Guid sessionID, int msgID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgID

Message identifier.

2.9.2.7 MsgGetSentThruList

MsgGetSentThruList
Returns a list of sent Thru messages

%(color-blue)FTHMsgData[] %
MsgGetSentThruList(Guid sessionID, string searchValue, DateTime? startDate, DateTime? endDate, int? pagingLastMsgID, int pagingMsgLimit)

Parameter Name

Description

sessionID

User session returned by one of Open functions

searchValue

Filter messages contain either subject or tracking number or private or public message .

startDate

Filter messages sent later than given date.

endDate

Filter messages sent earlier than given date.

pagingLastMsgID

Give null for first page. Give last MsgID to get next page.

pagingMsgLimit

Limit number of returned messages.

2.9.2.8 MsgGet

MsgGet
Retrieve the message object from the server

%(color-blue)FTHMsgData[] %
MsgGet(Guid sessionID, int msgID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgID

Message ID.

2.9.2.9 MsgDelete

MsgDelete
Delete the message from the server

MsgDelete(Guid sessionID, int msgID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgID

Message ID.

2.9.2.10 MsgDeleteFile

MsgDeleteFile
Detach the file from the message, file is not deleted from Thru file system

MsgDeleteFile(Guid sessionID, int msgID, int fileID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgID

Message ID.

fileID

File ID.

2.9.2.11 MsgDeleteFolder

MsgDeleteFolder
Detaches the folder from the message, folder is not deleted from Thru file system

MsgDeleteFolder(Guid sessionID, int msgID, int folderID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgID

Message ID.

folderID

Folder ID.

2.9.2.12 MsgExpire

MsgExpire
Sets message expiration to certain date. Expired message cannot be accessed by any recipients.

MsgExpire(Guid sessionID, int[] msgIDList, DateTime utcDateExpired)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgIDList

List of Message ID to set expired date.

utcDateExpired

Expired Date to be set.

2.9.2.13 MsgExpireNow

MsgExpireNow
Expires message immediately. Expired message cannot be accessed by any recipients.

MsgExpireNow(Guid sessionID, int[] msgIDList)

Parameter Name

Description

sessionID

User session returned by one of Open functions

msgIDList

List of Message ID to set expired date.

2.9.2.14 MsgDeleteRecipient

MsgDeleteRecipient
Delete a specific recipient from a message.

MsgDeleteRecipient(Guid sessionID, int recipientID)

Parameter Name

Description

sessionID

User session returned by one of Open functions

recipientID

Recipient ID to delete.

2.9.2.15 MsgGetCount

MsgGetCount
Retrieves the count of messages for the current user.

MsgGetCount(Guid sessionID)

sessionID

User session returned by one of Open functions