SMTP Predefined Operation
The following predefined SMTP operation is available:
sendEmail
Sends emails to specified recipients. You can attach one or more files to the message.
Input parameters
| Key | Description |
|---|---|
| from | (String, Optional). Email address of the sender. |
| to | (String, Optional). Email address of the receiver. If you specify multiple addresses, separate them with commas. |
| subject | (String) Subject of the message. |
| body | (String) The content of the message. |
| cc: | (String, Optional). Email addresses of other receivers. If you specify multiple addresses, separate them with commas. |
| bcc: | (String), Optional). Email addresses of other receivers. If you specify multiple addresses, separate them with commas. |
| subjectCharSet: | (String, Optional). The character set used to encode the subject. Default - UTF-8. |
| bodyCharSet: | (String, Optional). The character set used to encode the email message. Default - UTF-8. |
| attachments | (Document List) Attachments to the email message. |
| contenttype | (String) Content type of the attachment. For example, application/pdf. |
| content | (byte, String, or java.io.InputStream). Content of the attachment. |
| File name | (String) Name to assign to the attachment. |
| encoding | (String) Encoding of the attachment, for example, base64 or
7bit. If encoding is not specified, 7bit is used. |
| charset | (String) Character set encoding of the attachment. If charset is not specified, then UTF-8 encoding is used. |
Note: Rich content, such as HTML, can be sent through email in a similar way, but the
following points must be considered:
- body: Leave this field blank.
- Attachments:
- contenttype: Type text/html.
- Content: Content of the attachment in the HTML format.
Output parameter
| Name | Description |
|---|---|
| status | (String) Final status of the operation. |
Usage notes
- Define the from and to fields either in the account configuration dialog or at run time.
- If you are using file name to attach a file to the message and the file is not a plain text file, you must set the contenttype and encoding.