Adapter Online Help > TDV Email Adapter > Data Model > Stored Procedures
 
Stored Procedures
Stored procedures are available to complement the data available from the Data Model. It may be necessary to update data available from a view using a stored procedure because the data does not provide for direct, table-like, two-way updates. In these situations, the retrieval of the data is done using the appropriate view or table, while the update is done by calling a stored procedure. Stored procedures take a list of parameters and return back a dataset that contains the collection of tuples that constitute the response.
Email Adapter Stored Procedures
Name
Description
Gets the message part specified by LocalFile or PartId from the message specified by Id on the IMAP server.
Gets the message part specified by LocalFile or PartId from the message specified by Id on the POP server.
Moves the messages specified by Ids to the mailbox specified by Mailbox .
Sends the message to the specified recipient.
Adds or Replaces existing flags with the specified flags.
Adds or Replaces existing Labels with the specified Labels.
GetPartIMAP
Gets the message part specified by LocalFile or PartId from the message specified by Id on the IMAP server.
Input
Name
Type
Description
ID
String
The Id of the message that contains the part.
LocalFile
String
The local file where the content of the part will be written to.
Mailbox
String
The mailbox of the message that contains the part.
PartFileName
String
The part file name of the part to retrieve. Either the PartId or the PartFileName input must be specified.
PartID
String
The part Id of the part to retrieve. Either the part Id or the part file name input must be specified.
UIDMode
String
If true, permanent message Ids are used instead of the default temporary Ids.
Result Set Columns
Name
Type
Description
Content
String
If the LocalFile input is not specified, the base64 encoded content will be output. Otherwise, the path to the file containing the content will be output.
ContentType
String
The content type.
Size
String
The size of the message part.
FileName
String
The filename of the message part.
To
String
The list of recipients
From
String
The sender of the current message.
CC
String
The list of CCed recipients.
Subject
String
The subject of the current message.
Flags
String
The flags set on the current message.
Date
String
The date the current message was sent.
GetPartPOP
Gets the message part specified by LocalFile or PartId from the message specified by Id on the POP server.
Input
Name
Type
Description
ID
String
The Id of the message that contains the part.
LocalFile
String
The local file where the content of the part will be written to.
PartFileName
String
The part file name of the part to retrieve. Either the part Id or the part file name input must be specified.
PartID
String
The part Id of the part to retrieve. Either the part Id or the part file name input must be specified.
UIDMode
String
If true, permanent message Ids are used instead of the default temporary Ids.
The default value is FALSE.
Result Set Columns
Name
Type
Description
Content
String
If the LocalFile input is not specified, the base64 encoded content will be output. Otherwise, the path to the file containing the content will be output.
ContentType
String
The content type.
Size
String
The size of the message part.
FileName
String
The filename of the message part.
To
String
The list of recipients
From
String
The sender of the current message.
CC
String
The list of CCed recipients.
Subject
String
The subject of the current message.
Flags
String
The flags set on the current message.
Date
String
The date the current message was sent.
MoveEmails
Moves the messages specified by Ids to the mailbox specified by Mailbox .
Input
Name
Type
Description
Mailbox
String
The mailbox where the message is currently located.
The default value is Inbox.
Id
String
This inputs indicates the set of messages to operate on. It may consist of a single message id, a range of messages specified by two message numbers separated by ':' (e.g. '1:5'), and/or individual message numbers separated by ',' (e.g. '1:5,7,10').
Destination
String
The mailbox where the message will be moved.
The default value is Inbox.
Result Set Columns
Name
Type
Description
Success
String
Boolean response indicating whether or not the operation was successful.
SendMailMessage
Sends the message to the specified recipient.
Input
Name
Type
Description
To
String
The semicolon-separated list of names and email addresses of the recipients.
Subject
String
The subject of the mail message.
From
String
The email address of the sender.
MessageBody
String
The message body.
CC
String
The semicolon-separated list of names and email addresses of the CCed recipients.
BCC
String
The semicolon-separated list of names and email addresses of the BCCed recipients.
Attachment#
String
Semicolon-separated list of the attachment file names (with path if reading from a file) included in the message.
AttachmentData#
String
Semicolon-separated list of the base-64-encoded attachment data included in the message. (You must still specify the filename in Attachments.)
InlineImage#
String
Semicolon-separated list of the inline image identifiers (cids) to be included in the message.
InlineImageData#
String
Semicolon-separated list of the base-64-encoded image data to be included in the message.
IsHTML
String
Whether the email is HTML or plain text.
The default value is TRUE.
Importance
String
Importance of the mail message.
The allowed values are UNSPECIFIED, LOW, NORMAL, HIGH.
The default value is UNSPECIFIED.
Priority
String
Priority of the mail message.
The allowed values are UNSPECIFIED, NONURGENT, URGENT, NORMAL.
The default value is UNSPECIFIED.
Sensitivity
String
Sensitivity of the mail message.
The allowed values are UNSPECIFIED, PERSONAL, PRIVATE, COMPANYCONFIDENTIAL.
The default value is UNSPECIFIED.
DeliveryNotification
String
Email address to send a delivery notification to.
ReadReceipt
String
Email address to send a read receipt to.
Charset
String
The character set to use in the message.
The default value is UTF-8.
Result Set Columns
Name
Type
Description
MessageId
String
The Id for the message as returned by the server.
SetFlags
Adds or Replaces existing flags with the specified flags.
Input
Name
Type
Description
Mailbox
String
The Gmail mailbox where the message is located.
The default value is Inbox.
Id
String
This inputs indicates the set of messages to operate on. It may consist of a single message id, a range of messages specified by two message numbers separated by ':' (e.g. '1:5'), and/or individual message numbers separated by ',' (e.g. '1:5,7,10').
Flags
String
Sets the specified flags to the message specified by message set. (e.g., Seen, Deleted, Draft). Flags should be specified as comma separated list(e.g. Seen,Deleted)
The default value is Seen.
OperationType
String
This indicates weather the specified flags should be added,removed or replace existing flags list.
The allowed values are ADD, REPLACE, REMOVE.
The default value is REPLACE.
Result Set Columns
Name
Type
Description
Success
String
Boolean response indicating whether or not the operation was successful.
SetLabels
Adds or Replaces existing Labels with the specified Labels.
Input
Name
Type
Description
Mailbox
String
The Gmail mailbox where the message is located.
The default value is Inbox.
Id
String
This inputs indicates the set of messages to operate on. It may consist of a single message id, a range of messages specified by two message numbers separated by ':' (e.g. '1:5'), and/or individual message numbers separated by ',' (e.g. '1:5,7,10').
Labels
String
List of labels to be set to the message specified by the MessageSet property. This input should be set to a comma separate list of labels.
OperationType
String
This indicates weather the specified labels should be added,removed or replace existing labels list.
The allowed values are ADD, REPLACE, REMOVE.
The default value is REPLACE.
Result Set Columns
Name
Type
Description
Success
String
Boolean response indicating whether or not the operation was successful.