Task Messaging - Email - Send
The Email - Send Task sends a text or HTML message, with optional attachments, to one or more recipients, using an SMTP, Exchange EWS, Exchange WebDAV or Microsoft Graph API Connection. The message can be signed and encrypted with S/MIME or PGP/MIME.

This Task uses an SMTP, Exchange EWS, Exchange WebDAV or Microsoft Graph API Connection; see Connection - SMTP, Connection - Exchange EWS, Connection - Exchange WebDAV and Connection - Microsoft Graph API. With an SMTP Connection that uses "Default" authentication, the Task accepts any server certificate. The Task does not use the proxy set on the Connection.
The Main settings, Flow, On error, Conditions and TimeOut tabs are the same for every Task; see Job - Tasks.
Email - Send: Main settings tab
-
Connection: the Connection to send through, of one of these types: Connection - SMTP, Connection - Exchange EWS, Connection - Exchange WebDAV or Connection - Microsoft Graph API
-
Subject: the subject of the message. Variables are resolved
-
From name: the sender name that recipients see. Required
If the field is empty when the Task window opens, it is filled with From name from Settings - Email Settings.
-
From email: the sender address. Required
If the field is empty when the Task window opens, it is filled with From email from Settings - Email Settings.
-
Reply to email: the address that replies go to
If the field is empty when the Task window opens, it is filled with From email from Settings - Email Settings. To send without a separate reply address, clear the field before you save the Task. The field is filled again each time the Task window opens, so clear it each time you edit the Task.
-
Priority: "Low", "Normal" (default) or "High". How the priority is shown depends on the recipient's mail program
-
Security: how the message is signed or encrypted
- Do not use security features for this message (default): the message is neither signed nor encrypted
- Use S/MIME security features: enables the Sign and Encrypt tabs with S/MIME settings
- Use PGP/MIME security features: enables the Sign and Encrypt tabs with PGP/MIME settings
PGP/MIME signing and encryption are applied only with an SMTP Connection that uses "Default" authentication. With an Exchange EWS, Exchange WebDAV or Microsoft Graph API Connection, or an SMTP Connection that uses "Gmail OAuth", a message set to PGP/MIME is sent unsigned and unencrypted. With these Connections, S/MIME ignores Sign clear format and Sign root header, and matches encryption certificates to To addresses only.
-
Message type: the parts of the message
- Send Text: sends the plain text body from the Text tab. Selected by default
- Send HTML: sends the HTML body from the HTML tab, and enables the HTML and Chrome preview tabs
- Request delivery receipt: asks for a delivery notification from the mail system
- Request read receipt: asks the recipient's mail program for a read confirmation when the message is opened
With both Send Text and Send HTML selected, the message carries both bodies, and the recipient's mail program shows one of them.
Email - Send: Recipients tab

-
Recipient separator: the character between addresses, in the address fields and in recipient files: "Semicolon" (default), "Comma" or "Newline"
-
Send separate emails: selected by default
When selected, every To, Cc and Bcc address gets its own copy of the message, with only that address in To; the Cc and Bcc lines are not kept. If sending to one address fails, the error is written to standard error, the other addresses still get the message, and the Task ends with exit code 77777.
When cleared, one message goes to all addresses. To and Cc addresses are visible to every recipient; Bcc addresses are not. If the send fails, the Task fails.
-
To.., Cc.. and Bcc..: each group has a source list, an address field and a Credential list. The sources are:
- "Not used": the group is not used (default for Cc and Bcc)
- "Manual": type the addresses in the field, separated by the Recipient separator (default for To). Variables are resolved
- "File": type the path of a text file that holds the addresses, separated by the Recipient separator. Credential is enabled, and is used to read the file
The Task window requires at least one group that is not "Not used", and an address in at least one field.
With an SMTP Connection that uses "Default" authentication, spaces are removed from every address, and Variables are resolved in the contents of a recipient file. With the other Connections, spaces are kept, and Variables in a recipient file are not resolved.
Email - Send: Text tab

Type the plain text body. The tab is enabled when Send Text is selected. Variables are resolved. The message uses the character set of Encoding on the Task window's Main settings tab.
Email - Send: HTML tab

Type the HTML body. The tab is enabled when Send HTML is selected. Variables are resolved.
Email - Send: Chrome preview tab

Shows how the HTML from the HTML tab is displayed. Variables are not resolved in the preview.
Email - Send: Attachments tab

The list shows each attachment with its path and Credential. Click Add to add an attachment, Edit to change the selected one and Delete to remove it. Each attachment is a File Filter, so one entry can attach several files. The Credential of the filter is used to read files on a protected location. For what happens when a filter finds no file, or a file cannot be read, see Output and errors.
Email - Send: Sign tab (PGP/MIME)

The tab is enabled when Use PGP/MIME security features is selected in the Security group.
- Sign message: signs the message
- Use new features: selected by default. When selected, newer and stronger algorithms are used. When cleared, the result is compatible with PGP 2.6.x
- Choose key ring: the key ring with the private key to sign with. The whole key ring is used; no key is matched to From email. The grid lists the keys of the selected key ring
- Manage key rings: opens the PGP key rings, where you create or import key rings; see Global - PGP Key Rings
- Password: the passphrase of the private key, if it has one
Email - Send: Sign tab (S/MIME)

The tab is enabled when Use S/MIME security features is selected in the Security group.
-
Sign message: signs the message
-
Sign clear format: selected by default
When selected, the message is sent as "multipart/signed": every mail program can show it, and programs that support S/MIME can check the signature. When cleared, the message is sent as "application/pkcs7-mime" signed data: it is better protected against changes on its way through mail servers, but only programs that support S/MIME can show it.
-
Sign root header: when selected, header fields of the message, such as the subject, are signed too; From, To, Sender and Reply-To are not
-
Choose certificate: select exactly one certificate in the Use column. Only certificates that can sign are listed
-
Manage certificates: opens the certificates, where you create or import certificates; see Global - Certificates
Sign clear format and Sign root header apply only with an SMTP Connection that uses "Default" authentication. The signature uses SHA-1 with an SMTP Connection that uses "Default" authentication, and SHA-256 with the other Connections. The algorithm cannot be changed.
Email - Send: Encrypt tab (PGP/MIME)

The tab is enabled when Use PGP/MIME security features is selected in the Security group.
- Encrypt message: encrypts the message
- Choose key ring: the key ring with the recipients' public keys. The message is encrypted to every public key in the key ring; no key is matched to a recipient address. Use a key ring that holds only the keys of the intended recipients
- Manage key rings: opens the PGP key rings; see Global - PGP Key Rings
Email - Send: Encrypt tab (S/MIME)

The tab is enabled when Use S/MIME security features is selected in the Security group.
- Encrypt message: encrypts the message
- Choose certificate(s): select one or more recipient certificates in the Use column. Only certificates that can encrypt are listed
- Manage certificates: opens the certificates; see Global - Certificates
With an SMTP Connection that uses "Default" authentication, the message is encrypted for every selected certificate. With the other Connection types, each selected certificate is used only for the first To address that the email address in the certificate is equal to or ends with; the comparison is case-sensitive. Cc and Bcc addresses never get a certificate, also when Send separate emails sends each of them its own copy. Encryption uses 3DES, which cannot be changed.
Output and errors
Standard output lists each address that the message was sent to. The Task ends with an error in these cases:
- No address in any recipient group: "No recipients were specified." is written to standard error, no message is sent, and the exit code is 77777
- The recipient file does not exist: "Recipient file did not exist." is written to standard error, no message is sent, and the exit code is 77777
- A file that an attachment's file filter finds cannot be read: the error is written to standard error, no message is sent, and the exit code is 77777
- With Send separate emails, sending to one address fails: the error is written to standard error, the other addresses still get the message, and the exit code is 77777
- The Connection is missing: the Task fails with "Connection not found" or "No Connection was selected"
Exit code 77777 is handled by the "Non zero exit code" cause on the On error tab, unless an Exit code collection other than the default is selected there; see Task - On Error.
If Use PGP/MIME security features is selected with a Connection that does not apply PGP/MIME (see Security), the message is sent unsigned and unencrypted, and the Task reports success.
With an Exchange EWS, Exchange WebDAV or Microsoft Graph API Connection, or an SMTP Connection that uses "Gmail OAuth", if the S/MIME signing certificate is no longer in Global - Certificates, or cannot sign, the message is sent unsigned, and the Task reports success. With an SMTP Connection that uses "Default" authentication, a missing signing certificate makes the Task fail.
If the file filter of an attachment finds no matching file in a folder that exists, the message is sent without that attachment, and the Task reports success.