To create a new email message in Connect, use:
create email if not exists email_name as ( parameter_list );
Where email_name (the name of the email object) is required and if not exists is an optional clause that allows the email object to be created only if it does not currently exist in Connect. (It suppresses an xSQL error when an email name clash occurs.)
And where parameter_list includes:
- “To” = email_addresses
(required) The comma-separated list of recipients of the email. - “From” = email_addresses
(optional) The sender of the email. Defaults to xactly@connect_server_name. - “Cc” = email_addresses
(optional) The comma-separated list of carbon copy recipients. - “Bcc” = email_addresses
(optional) The comma-separated list of blind carbon copy recipients. - “Subject” = string
(optional) The subject of the email.
NOTE: Try to make the Subject as specific and identifiable as you can. Remember that humans will be receiving and reading these email messages. - “Body” = string
(required) The body of the email. The string can be any text MIME type. - “BodyType” = string
(optional) The MIME type of the email body, such as ‘html’. The default type is ‘plain’. For a complete list of text MIME types, see the IANA web site. - “ReplyTo” = email_addresses
(optional) The email addresses to which any replies should be sent. - “Attachment#” = string OR result_set
(optional) Attaches a file to the email message. # is a positive integer, starting at 1, that identifies each distinct file attachment.
NOTE: You can attach multiple files using “Attachment1”, “Attachment2”, etc. - “AttachmentName#” = string
(optional) Sets the name for the file attachment. The name defaults to the referenced file name, or, if it’s an xSQL result set, to ‘Attachment#’. - “AttachmentType#” = string
(optional) The MIME type of the attachment. The default type is ‘plain’. For a complete list of text MIME types, see the IANA web site.