Sending a File with Email
You can use the sendFile call to send an email with the file as an attachment.
Parameters
Parameter | Description |
---|---|
id | Required.
The document ID. It can be on the URL, or be posted as a parameter. |
recipient | Required.
One or more recipients. The format is <type>:<emailOrUserId>. The valid types are To, CC, and BCC. emailOrUserId is either a valid email address or a user ID. |
subject | Optional.
Email subject. The default value is a system generated subject. |
message | Optional.
A message in HTML format. The default value is a system generated message. |
expirationDate | Optional.
The maximum expiration date when download expires. The format is yyyy-mm-dd. The default date is the maximum expiration date. |
expireSameDay | Optional.
Expire the same day after all files have been downloaded even if it is before the defined expirationDate parameter. If value is set as Y or y, it indicates as true; otherwise, it is false. The default is false. |
notifyMe | Optional.
The valid values are true and false. If the value is true , notify the sender via email when files are downloaded. The default value is true . |
Response
The format of the response is "{"message":"<response message>"}"
Example 1:
Example 2:
abc@xyz.com, the recipient does not exist in the database. You are not authorize to create the account.