send-email
Sends a file securely to an email address using a download link.
Syntax:
sfiler [options] send-email [Command options] <filename>| Command Options | Required/Optional | Description |
|---|---|---|
| -r | Required | Comma separated list of email addresses to which the files will be sent. |
| -st | Optional | Comma separated list of secret types protecting the files, one per recipient: PASSWORD or NONE. If the option is absent, the NONE type is used for every recipient. |
| -sv | Optional | Comma separated list of secret values, one per recipient. For PASSWORD, this is the password you must communicate to the recipient. For NONE, the value must be left empty. |
| -l | Optional | Comma separated list of languages in which the email must be sent, one per recipient. If the option is absent, the email is sent in English to every recipient. |
| -tc | Optional | Time to live count. Set to determine how many times the file can be download. Default: 0 |
| -td | Optional | Set an absolute expiration date. After this date, the file cannot be downloaded, it will be deleted. (ex: 2011-12-31) |
| -th | Optional | Set a relative expiration date. The file will expire in X hours from now. (ex: 2) |
| -x | Optional | Message to be appended to the email notice. |
| -t | Optional | Specify a theme to override the default notification theme. |
| -g | Optional | Upload the file on behalf of a group. |
Warning
If path not included in filename, Current path will be assumed.
Warning
The send-email command always uses the download link mode (DOWNLOAD_LINK). The command line does not offer the direct access mode (DIRECT_ACCESS_TOKEN).
Important
The lists supplied to the -r, -st, -sv and -l options must contain the same number of elements, since each position corresponds to one recipient:
- If the number of
-stor-svvalues does not match the number of recipients, the command stops with an error message before sending anything. - If the number of
-lvalues does not match, the command displays the message "The number of languages (…) must correspond to the number of recipients (…). Transfer canceled." but, despite this message, continues; the server then rejects the transfer with error 5018 (Invalid input field value).
The values of these lists are separated by commas, and the spaces around each value are removed. A value can therefore never contain a comma: a password such as ab,cd is split into two values.
Warning
The -wp option, which existed in versions prior to 4.21.0, has been removed. It is replaced by the combination of the -st and -sv options. See Upgrading to 4.21.0 for the procedure to migrate your scripts.
Warning
Constraints on secret types:
NONEis only accepted if your instance security policy allows sends without a secret. The corresponding secret value must be left empty.PASSWORDrequires a secret value that complies with the Recipient Password Policy that applies to you.- The
SMS_OTPandEMAIL_OTPtypes are rejected bysend-email, because these one-time codes require theDIRECT_ACCESS_TOKENtransfer mode, which the command line does not offer.
Examples:
Warning
On Linux, enclose the secret values in single quotes ('...'): within double quotes, the shell interprets characters such as $ and ! before the command receives them.
Sending to a single recipient, protected by a password:
./sfiler.sh -l "my-user" -p "my-password" -s https://www.example.com/sfiler/server/ send-email -r "msmith@mycompany.com" -st PASSWORD -sv 'd7*$hp#1' -x "the file you have requested, I will tell you the password by phone" "my-file.txt"sfiler.exe -l "my-user" -p "my-password" -s https://www.example.com/sfiler/server/ send-email -r "msmith@mycompany.com" -st PASSWORD -sv "d7*$hp#1" -x "the file you have requested, I will tell you the password by phone" "my-file.txt"Sending to two recipients with distinct passwords and languages:
./sfiler.sh -l "my-user" -p "my-password" -s https://www.example.com/sfiler/server/ send-email -r "msmith@mycompany.com,jjohnson@thatbusiness.com" -st PASSWORD,PASSWORD -sv 'd7*$hp#1,9k@wQ#4z' -l en,fr "my-file.txt"sfiler.exe -l "my-user" -p "my-password" -s https://www.example.com/sfiler/server/ send-email -r "msmith@mycompany.com,jjohnson@thatbusiness.com" -st PASSWORD,PASSWORD -sv "d7*$hp#1,9k@wQ#4z" -l en,fr "my-file.txt"See Also
