Send Mail

Send Mail is a synchronous activity that sends an email by way of an SMTP server.

General

The General tab has the following fields.

Field Literal Value/Module Property Description
Name None The name to be displayed as the label for the activity in the process.
SMTP Property Yes The property name of the SMTP server.

If your server is configured for using a different port, specify it in this field.

Description

Provide a short description of the activity.

Advanced

The Advanced tab has the following fields.

Field Description
Allow Non-Standard Email IDs By default, email IDs specified in the to, from, cc, bcc, or replyTo input elements must conform to the RFC 822 standard for email addresses.

Select this check box to specify email IDs that do not conform to the RFC 822 standard. This is useful for sending mail to a server that has extensions for sending email to devices such as a fax machine.

For more information about email address syntax, see http://www.faqs.org/rfcs/rfc822.html.

Note: When this field is not selected, not all of the RFC 822 syntax rules are enforced. For example, addresses composed of simple names (with no "@domain" part) are allowed.

For more information about enforcing RFC 822, see the description of the strict flag of the parse method of javax.mail.internet.InternetAddress at https://docs.oracle.com/

Input Editor

You may want to add custom headers to outgoing mail messages. From the Input Editor tab you can define a custom schema for the headers of the outgoing mail message. You can specify any standard header supported by the javax.mail package. For example, X-Mailer or X-Priority.

Input

The following is the input for the activity.

Input Item Datatype Description
username string The username to use when authenticating to the mail server.
password string The password to use when authenticating to the mail server.
from string The email address of the sender.
to string The recipient list for the email. Use this repeatable element to send mail to more than one recipient.

Provide a list of "to" recipients in a single string by using either a comma or a semicolon (but not both in the same string) as delimiters.

cc string The "cc" (carbon copy) list for the email. Use this repeatable element to place more than one recipient on the "cc" list, if required.

Provide a list of "cc" recipients in a single string by using either a comma or a semicolon (but not both in the same string) as delimiters.

bcc string The "bcc" (blind carbon copy) list for the email. Use this repeatable element to place more than one recipient on the "bcc" list.

Provide a list of "bcc" recipients in a single string by using either a comma or a semicolon (but not both in the same string) as delimiters.

replyTo string The "replyTo" list for the email. Use this repeatable element to place more than one recipient on the "replyTo" list.

Provide a reply to list in a single string by using either a comma or a semicolon (but not both in the same string) as delimiters to separate the addresses in the list.

subject string The subject of the email.
sentdate string The date stamp for the email.
Note: The email server provides the actual date stamp for the email, so this input item is ignored. Do not attempt to place a value in this input item.
bodyElement complex Contains a choice element.

You can either provide the bodyText element or fileName element.

bodyText string The text of the email message.
fileName string The file name of the attachment written to the disk.
Headers complex Contains the schema you defined on the Input Editor tab. Specify custom headers for the outgoing mail messages.

Specify any standard header supported by the javax.mail package. For example, X-Mailer or X-Priority.

To use attachments, specify the Content-Type header as multipart/* (where * is a valid subtype of the multipart).

contentType string The mime content type for the message. You can specify a character encoding in this element for the encoding of the body of the message.
mimeEnvelopeElement complex Contains the message attachments.
mimePart complex This repeating element comprises each mime attachment.
mimeHeaders complex This element contains the mime header for each mimePart.

mimeHeaders contain the following information:

  • content-disposition - To imply a filename for an attachment, use "*;filename=<filename>" in this element.
    Note: E-mail servers may alter or ignore the suggested name.
  • content-type
  • content-transfer-encoding
  • content-id
  • any element

For more information about MIME headers and their syntax, see http://www.faqs.org/rfcs/rfc2045.html .

Note: When the contentType is specified as "text/*" (for example, "text/xml"), specify the attachment content in either the textContent input element or the file name storing the attachment in the fileName input element. When the contentType is anything other than "text/*":
  • The attachment content must be in the binaryContent input element.
  • The file name storing the attachment must be in the fileName input element.
binaryContent | fileName | textContent choice This element contains the mime attachment. It can be any of the following:
  • binaryContent: the content of the attachment when the attachment is binary data.
  • fileName: the file name of the attachment written on the disk.
  • textContent: the content of the attachment when the attachment is text data.

Fault

The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective actions to take, see the TIBCO BusinessWorks™ Container Edition Error Codes guide.

Fault Generated When..
InvalidInputException The input is not valid.
UnknownHostException The mail server host name is not resolved.

The exception contains the name of the mail server host.

SendFailedException The send operation failed for some reason.