Send Email

The Send Email action sends an email.

Note The email is not sent during execution in Design mode in Design Studio.

Properties

The Send Email action can be configured using the following properties:

Message Tab

This tab contains the properties that allow you to specify the message content, sender and receiver.

FROM Address

Specifies the FROM Address (sender address) of the email. The value can be specified in several ways using a Value Selector.

TO Address

Specifies the TO Addresses (receiver addresses) of the email. At least one To Address must be specified and if there are more than one address these has to be separated by commas. The value can be specified in several ways using the Value Selector.

CC Address

Specifies the CC Addresses (receiver addresses) of the email. These addresses are optional, but if more than one address is specified the addresses has to be separated by commas. The value can be specified in several ways using the Value Selector.

Subject

Specifies the subject of the email. The value can be specified in several ways using the Value Selector.

Message

Specifies the message body of the email. The value can be specified in several ways using the Value Selector.

Message Type

Specifies the type of the message body, either text or HTML.

Server Tab

This tab contains the properties that allow you to configure the mail server to use.

Mail Server

Specifies the mail server to be used when sending the email. The value can be specified in several ways using a Value Selector.

Port

Specifies the port number on the mail server to be used when sending the email. The appropriate port number is most often 25 when SSL is not used, and 465 when using SSL. The value can be specified in several ways using the Value Selector.

User

Specifies the user name to be used for authentication when sending the email. If left empty, authentication is not done. The value can be specified in several ways using the Value Selector.

Password

Specifies the password to be used for authentication when sending the email. The value can be specified in several ways using the Value Selector.

Encryption

Specifies if encryption should be used.

  • NONE: Credentials and email are sent in clear text.
  • TLS: TLS encryption is used. Currently, TLS version 1.2 is used.

    After connection, the STARTTLS command is used to upgrade the communication channel to TLS. This only works if the SMTP server has a trusted certificate (if the server uses a self-signed certificate, it must be exported and imported into the JVM keystore using the keytool utility).

  • SMTPS: SMTP over SSL. A secure channel of communication is established, over which the credentials and email is sent. This is rarely supported by SMTP servers, but will work even if the servers certificate is self-signed.
Attachment Tab

This tab contains the properties that allow you to add an attachment to the e-mail.

Include Attachment

To add an attachment to the message, check this option.

Content

The content of the attachment to include. The value can be specified in several ways using a Value Selector.

Content Type

Specifies the type of the attachment. If you select "Automatic", the type will be determined from the extension of the given file name.

File Name

Specifies the type of the attachment. If you do not specify one, a default name will be generated.

Export and import certificate

This procedure shows how to export the SMTP certificate and then import it to the JVM keystore. Follow these steps only if you configure the Send Email step with TLS and the SMTP server uses a self-signed certificate. For more information, see the section "Encryption" above.

  1. Back up the existing certificate store cacerts, which resides in:

    C:\Program Files\Kofax RPA <version number> x64\jre\lib\security

  2. Dump the certificate(s) specified in the STARTTLS command.

    For example, you can perform the dump using the OpenSSL tool and executing the following command:

    C:\Program Files\OpenSSL-Win64\bin>openssl s_client -showcerts
    -starttls smtp -crlf -connect smtp.gmail.com:587

    Change the server and port number as applicable.

  3. Create a new certificate file (or multiple files).

    1. Copy the entire content of the dumped certificate, including the BEGIN and ENG headers, and paste it in a new file using Notepad.

    2. Select the .cer extension for the new file. For example, ABCD.cer.

      If you create multiple certificates, save them as separate files, but keep the original order, such as ABCD1.cer, ABCD2.cer, and so on.

  4. Save your .cer file to the following location:

    C:\Program Files\Kofax RPA <version number>\jre\lib\security

  5. Import the .cer file to the Kofax RPA JVM keystore.

    To do so, run the Command Prompt as administrator and execute the command similar to the following to import the dumped certificates to the cacerts file:

    C:\Program Files\Kofax RPA <version number> \jre\bin>keytool -import -trustcacerts -alias ABCD -file ..\lib\security\ABCD.cer -keystore ..\lib\security\cacerts -storepass changeit

  6. When prompted, type yes.

  7. If you have multiple certificates, repeat steps 4-6 for them. Make sure to change the alias parameter in the command.

  8. Restart Design Studio and test the Send Email step with TLS enabled in Debug mode.