5.26.5 SEND
The SEND command sends the email.
You can use the TO, CC, BCC, FROM and SUBJECT keywords in the SEND command to override the values set by the SMTPMailService properties file or the SET command.
If the SEND command has a working list argument, the list entries will be used to create the message body. The first list field must contain the text and an optional second field is used to control the concatenation process. If no second field is present, or the field has a value of blank, then the default option value of NA is used.
The possible option values are:
SB - Add a space before appending the text entry, except for the first entry.
NB - Add a new line before appending the text entry, except for the first entry.
SA - Add a space after appending the text entry, except for the last entry.
NA - Add a new line after appending the text entry.
If the second field value is not one of the above, then no additional action is taken, and the next entry is appended to the previous entries.
Syntax:
Command
|
Keyword
|
Value
|
Developer notes
|
SEND
|
TO
|
value
|
Allows a single email address to be nominated for the email to be sent to. Alternatively, use the SET command to specify a single TO email or multiple TO emails.
|
CC
|
value
|
Allows a single email address to be nominated for the email to be "cc-ed" (carbon copied) to. Alternatively, use the SET command to specify a single CC email or multiple CC emails.
|
BCC
|
value
|
Allows a single email address to be nominated for the email to be "bcc-ed" to. Alternatively, use the SET command to specify a single BCC email or multiple BCC emails.
|
FROM
|
value
|
The email address this message originated from. A FROM email address must be supplied to SEND an email.
The FROM property is typically configured in the SMTPMailService properties file as it usually stays the same and this ensures a consistent FROM email address which can be easily changed. Alternatively, this value may be specified in the SET command.
|
SUBJECT
|
value
|
Indicates the subject of the email. Alternatively, this value may be specified in the SET command.
|
SIGNER
|
name:password
|
The signer value is in the format of name:password. These values are used to access the private key and certificate in the keystore. Refer to the SET KEYSTORE command.
To send signed emails, a private key and public certificate are needed by the SMTPMailService. The private key and certificate are stored in a keystore file using a label. The label is the name component and the password component are used to read the private key.
There is no need to send a public certificate to the party who receives the signed email. The public certificate is automatically included in the email.
Important: There is no need to send private key store files to the other party. Only public certificates are exchanged.
|
ENCRYPT
|
*DES-EDE3
|
Triple DES. If the email is to be encrypted, an encryption algorithm (cipher) must be specified. By default, no encryption is applied to an email. Encrypted emails require the public certificates of all the email recipients. The person receiving your email must send you their public X.509 certificate. Add an entry to SMTPMailService properties file for each email recipient indicating the location of their public X.509 certificate.
For example:
recipient.certificate.john.doe@acme.com=pki/acme_john_doe.cer
|
*RC2-40
|
RC2 40 CBC
|
*RC2-64
|
RC2 64 CBC
|
*RC2-128
|
RC2 128 CBC
|
*AES-128
|
AES 128 CBC
|
*AES-192
|
AES 192 CBC
|
*AES-256
|
AES 256 CBC
|
CONTENT
|
*PLAIN
|
Default. Indicates a MIME type of text/plain and is used for simple text messages.
|
*HTML
|
A MIME type of text/html allows the body of the email to be formatted using HTML tags.
|
mimetype
|
The MIME type value creates the custom content, that is, text/enriched.
|
BODY
|
value
|
A file can be nominated to contain the body text. If the specified file does not exist, the body text is created from the service list argument if it is provided.
If this keyword is used, any reference to a working list is ignored as the body text is taken from the file and converted to Unicode using the ENCODING keyword value.
|
ENCODING
|
value
|
Used to specify what encoding must be applied to the byte content to convert it to a Unicode string. The default value is *DEFAULT.
Refer to ENCODING for more information.
|
|
Example
SEND SUBJECT(Sales Report) #WRKLST(TXT)
SEND SUBJECT(Sales Report) #WRKLST(TXT,CNTRL)
SEND SUBJECT(Sales Report) ENCRYPT(*DES-EDE3)
SEND SUBJECT(Sales Report) SIGNER(ACMECORP:password)