The AODocs Mail Sender lets users send AODocs documents as emails. The basic feature of the AODocs Mail Sender lets users define the email recipients, the body and the subject of the email. Any attached files in the document are included as email attachments.
Automatically generated table of contents
Define the mail provider
By default, the AODocs Mail Sender uses the SendGrid mail provider on the US instance and the Mailgun mail provider on the EU instance. Learn more: What are AODocs instances?
If your library administrator has set up this advanced feature, there's a property in the configured document class where you can define the required mail provider. Enter one of the following values:
- SendGrid
- Mailjet
- Mailgun
- Gmail
Note: These values aren't case sensitive.
Deactivate the default body layout
By default, the body of the AODocs Mail Sender is displayed in a block.
If your library administrator has set up this advanced feature, there's a Boolean property in the configured document class that lets you deactivate the default body layout.
If you deactivate the default layout, the body of the email has the following layout.
Define a title for the email body
If your library administrator has set up this advanced feature, there's a property in the configured document class that lets you define a title for the default body.
Note: To use this feature, you must activate the default body layout.
In the email you send, the default body contains a title.
Add Cc recipients
If your library administrator has set up this advanced feature, there's a property in the configured document class that lets you add Cc recipients to the email you send.
Add Bcc recipients
If your library administrator has set up this advanced feature, there's a property in the configured document class that lets you add Bcc recipients to the email you send.
Email with Cc and Bcc recipients
Define a Reply to address
If your library administrator has set up this advanced feature, there's a property in the configured document class that lets you define a Reply to address.
By default the Reply to address is the person who triggered the custom script to send the email.
Note: If the property is multi-value, you can enter an email group. However, you can only enter one email address. If you enter more than one address, the email is sent only to the first address in the list.
In the example below, all members of Mike's group will receive the reply to the email.
Define whether to ignore or convert attached files
If your library administrator has set up this advanced feature, there's a property in the configured document class that lets you ignore or convert the attached files, as indicated in the table below.
Parameter value | What happens |
DEFAULT |
Converts Google files to PDF and sends them in the email. Other files are not converted and are sent in the email in their original format. |
Converts Google files and Microsoft Office files to PDF and sends them in the email. Other files are not converted and are sent in the email in their original format. |
|
MSOFFICE |
Converts Google files to their equivalent Microsoft Office format (DOCX, XLSX, PPTS). Other files are not converted and are sent in the email in their original format. |
IGNORE | Attachments are not sent in the email. |
Send attachments as a zip archive
If your library administrator has set up this advanced feature, there's a switch in the configured document class that lets you send all the email attachments as a single zip archive.
The zip archive takes the name of the subject of the email.
Define the maximum number of attachments per email
If your library administrator has set up this advanced feature, there's a property in the configured document class that lets you limit the number of attachments per email. If this limit is reached, more than one email will be sent.
For example, if your AODocs document has five attached files and you set the maximum number of attachments per email as 2, three emails will be sent. The first two emails will contain two attachments and the third email will contain one attachment.
Merge attached files as a PDF file
If your library administrator has set up this advanced feature, when you send your email, the attached files in your AODocs document are merged as a PDF file and attached to the email.
There is a property in the configured document class that lets you define the name of the PDF containing the merged attached files.
Notes:
– You must add the suffix .pdf to the name you define.
– Only Google formats and PDF files can be merged. All Microsoft Office files, PNG files, JPG files and files of any other format are included as separate email attachments.
Select which attached files to merge
Note: This feature is for Document Management libraries only. Documents in Secured Folders and Team Folders contain only one document.
By default, when you merge attached files as a PDF file, Mail Sender converts all the attached files in the latest version of the current AODocs document.
If your library administrator has set up this advanced feature, there's a property in the configured document class where you can define which attached files you want to include in the PDF.
You can select attached files:
- in the current document
- in another version of the current document
- in a different document in the same library
- in a document in a different library
Important: If you select attached files in a document in a different library, the library must be on your domain and it must use the same storage platform. Learn more: Where is my content stored?
1. Enter the IDs of the required attached files in the order in which they want them to appear in the PDF.
- For files stored in Google Drive, use the the Drive ID of the file, for example:
1AGB3KEBfRGGQqOmQisGqoOS0NGlRC7oyxv4P7yW7-C0
- For files stored in Google Cloud Storage or Azure Blob Storage, you can use either:
- the URL of the document, for example:
https://storage.aodocs.com/storage/<domain>/<library Id>/<class Id>/<document Id>/<object Id>
- the object ID of the document, for example:
Trnxgb24KSfxL3tMUN
- the URL of the document, for example:
Important: If you use only the object ID, the attached file must be in the document from which you generate the PDF.
Apply a header to the merged PDF
If your library administrator has set up this advance feature, there's a property in the configured document class where you can define the text to use as a header.
1. Define what you want to include as a header. You can enter:
- text
- a block of HTML code – in this case you must define the text for the header; if your library administrator has activated style attributes, you can also define any required style attributes with your block of HTML code
- a placeholder
Note: If you are using the ADVANCED renderer, you can't use HTML code to define the header.
In our example, we entered the text For internal use only in the property "Header text".
2. If configured, you can define the font family with one of the following values, depending on the type of renderer defined:
- LEGACY renderer: HELVETICA (default), COURIER, SYMBOL, ZAPFDINGBATS,
- STANDARD renderer: HELVETICA (default), COURIER, TIMES_ROMAN
- ADVANCED renderer: ANDALE_MONO, COMISANS, GEORGIA, IMPACT, TREBUCHET, VERDANA, WEBDINGS
In our example, we are using a LEGACY renderer and we entered "COURIER" in the property "Header font family".
3. If configured, you can define the font style with one of the following values: NORMAL (default), BOLD, ITALIC, OBLIQUE, UNDERLINE, LINETHROUGH.
In our example, we entered BOLD in the property "Header font style".
4. If configured, you can define the font size with any value greater than 0. The default value is 32.
In our example, we entered 18 in the property "Header font size".
5. If configured, you can define the font color with any RGB value. The default value is 0,0,0,50.
In our example, we entered 245,19,19,100 in the property "Header font color".
Note: You must enter four values separated by commas. The first three values define the RGB color, the fourth value defines the opacity.
6. If configured, you can define the text alignment with any one of the following values: CENTER (default), LEFT, RIGHT.
In our example, we left the "Header font color" property empty, so the default value CENTER is applied.
Note: If your document has no values defined for any styling parameters (steps 2 to 6 above), no styling is applied, and the defaults indicated above are not applied. When you add a value to one or more styling parameters, the styling code from the custom script is activated. If there are any styling parameters without values, the defaults are applied.
Below is an example of a header.
Apply a footer to the merged PDF
If your library administrator has set up this advance feature, there's a property in the configured document class where you can define the text to use as a footer.
1. Define what you want to include as a footer. You can enter:
- text
- a block of HTML code – in this case you must define the text for the header; if your library administrator has activated style attributes, you can also define any required style attributes with your block of HTML code
- a placeholder
Note: If you are using the ADVANCED renderer, you can't use HTML code to define the header.
In our example, we entered Created on ${creationDate} by ${initialAuthor} in the property "Header text".
2. If configured, you can define the font family with one of the following values, depending on the type of renderer defined:
- LEGACY renderer: HELVETICA (default), COURIER, SYMBOL, ZAPFDINGBATS,
- STANDARD renderer: HELVETICA (default), COURIER, TIMES_ROMAN
- ADVANCED renderer: ARIAL (default), ARIAL_BLACK, ANDALE_MONO, COMISANS, GEORGIA, IMPACT, TREBUCHET, VERDANA, WEBDINGS
In our example, we are using a LEGACY renderer and we entered COURIER in the property "Footer font family".
3. If configured, you can define the font style with one of the following values: NORMAL (default), BOLD, ITALIC, OBLIQUE, UNDERLINE, LINETHROUGH.
In our example, we entered ITALIC in the property "Footer font style".
4. If configured, you can define the font size with any value greater than 0. The default value is 32.
In our example, we entered 14 in the property "Footer font size".
5. If configured, you can define the font color with any RGB value. The default value is 0,0,0,50.
In our example, we entered 51,51,255,100 in the property "Footer font color".
Note: You must enter four values separated by commas. The first three values define the RGB color, the fourth value defines the opacity.
6. If configured, you can define the text alignment with any one of the following values: CENTER (default), LEFT, RIGHT.
In our example, we entered RIGHT in the property "Footer alignment".
Note: If your document has no values defined for any styling parameters (steps 2 to 6 above), no styling is applied, and the defaults indicated above are not applied. When you add a value to one or more styling parameters, the styling code from the custom script is activated. If there are any styling parameters without values, the defaults are applied.
Below is an example of a footer.
Define the page to start the header and footer in the merged PDF
If your library administrator has set up this advance feature, there's a property in the configured document class where you can define the page number at which the header and footer in the merged PDF start.
Note: This advanced configuration works in custom scripts containing both a header and a footer, a header only, or a footer only.
Apply a watermark to the merged PDF
If your library administrator has set up this advance feature, there's a property in the configured document class where you can define the text to use as a watermark.
1. Define what you want to include as a watermark. You can enter:
- text
- a placeholder
In our example, we entered Confidential in the property "Watermark text".
2. If configured, you can define the font family with one of the following values, depending on the type of renderer defined:
- LEGACY renderer: HELVETICA (default), COURIER, SYMBOL, ZAPFDINGBATS,
- STANDARD renderer: HELVETICA (default), COURIER, TIMES_ROMAN
- ADVANCED renderer: ANDALE_MONO, GEORGIA, IMPACT, TREBUCHET, VERDANA, WEBDINGS
In our example, we are using a LEGACY renderer and we left the "Header font family" property empty, so the default HELVETICA font is applied.
3. If configured, you can define the font style with one of the following values: NORMAL (default), BOLD, ITALIC, OBLIQUE, UNDERLINE, LINETHROUGH.
In our example, we entered UNDERLINE in the property "Watermark font style".
4. If configured, you can define the font size with any value greater than 0. The default value is 100.
In our example, we entered 120 in the property "Watermark font size".
5. If configured, you can define the font color with any RGB value. The default value is 0,0,0,50.
In our example, we entered 51,51,255,100 in the property "Watermark font color".
Note: You must enter four values separated by commas with no spaces. The first three values define the RGB color, the fourth value defines the opacity.
6. If configured, you can define the rotation angle with any value greater than 0. The default value is 60.
In our example, we left the "Watermark rotation" property empty, so the default value 60 is applied.
7. If configured, you can define how many times the watermark text is applied, with any value greater than 0. The default value is 1.
In our example, we left the "Watermark repeat" property empty, so the default value 1 is applied.
Note: If your document has no values defined for any styling parameters (steps 2 to 7 above), no styling is applied, and the defaults indicated above are not applied. When you add a value to one or more styling parameters, the styling code from the custom script is activated. If there are any styling parameters without values, the defaults are applied.
Below is an example of a PDF with a watermark.
Apply specific permissions to PDF files
If your library administrator has set up this advance feature, there is a property in the configured document class where you can define which permissions to apply to any PDFs sent in the email. This concerns PDFs sent using the basic custom script, attached files converted to PDF, or attached files merged as a PDF.
Notes:
– If there is a password to open the merged PDF, no permissions are applied.
– If there isn't a password to open the PDF, by default all permissions are applied – you can change this by selecting specific permissions to apply.
1. Check that no password is required to open the PDF.
2. Define the permissions you want to apply:
Permission | Users can... |
ALLOW_ASSEMBLY |
concatenate the generated PDF with other PDFs |
ALLOW_COPY |
copy and extract text and images from the PDF |
ALLOW_DEGRADED_PRINTING |
print the PDF with the low-quality setting |
ALLOW_FILL_IN |
add form fields to the PDF |
ALLOW_MODIFY_ANNOTATIONS |
add annotations to the PDF |
ALLOW_MODIFY_CONTENT |
modify the content of the PDF |
ALLOW_PRINTING |
print the document |
ALLOW_SCREENREADERS |
read the PDF with screen readers |
In our example, we defined the following permission:
ALLOW_MODIFY_ANNOTATIONS
The screenshot below shows this permission in the generated PDF.
Apply a password to open the merged PDF
If your library administrator has set up this advance feature, there's a property in the configured document class where you can define the password to open PDF attachments in the email. This concerns PDFs sent using the basic custom script, attached files converted to PDF, or attached files merged as a PDF.
Notes:
– Only PDF attachments have passwords; attachments of other formats don't have a password.
– Use the same password to open all PDF attachments in the email.
Below is an example of an email containing PDF attachments with a password.
Define which renderer to use to merge the PDF
If your library administrator has set up this advance feature, there's a property in the configured document class where you can define which PDF renderer to use.
Each renderer offers a different list of font families for the header, footer and watermark in the merged PDF.
You can define one of the following renderers:
- LEGACY: offers HELVETICA (default), COURIER, SYMBOL, ZAPFDINGBATS,
- STANDARD: offers HELVETICA (default), COURIER, TIMES_ROMAN
- ADVANCED: offers ARIAL (default), ARIAL_BLACK, ANDALE_MONO, COMISANS, GEORGIA, IMPACT, TREBUCHET, VERDANA, WEBDINGS
Note:
– If your library uses Google Drive, the default renderer is LEGACY.
– If your library uses Google Cloud Storage or Microsoft Azure Blob Storage, the default renderer is ADVANCED.
– The ADVANCED renderer is faster than the others and handles more font families. However, if you use the ADVANCED renderer, you can't use HTML code for the header or footer.
Define which converter to use to merge the PDF
If your library administrator has set up this advance feature, there's a property in the configured document class where you can define which PDF converter to use.
You can define one of the following converters:
- DRIVE: default option for libraries using Google Drive
- ADVANCED: default and mandatory option for libraries using Google Cloud Storage or Microsoft Azure Blob Storage
Note: Libraries using Google Drive can use either converter. However, there's no advantage to using one or other converter so there's usually no reason to change the default.
Define the maximum size of the email
If your library administrator has set up this advanced feature, there's a property in the configured document class that lets you define the maximum size of any individual email that is sent.
Enter a number in the property, for example, 6. This means that the maximum size of any individual is 6MB. The default value is 10. The maximum is 24.
This is what happens when you use a maximum size value:
- If any one attached file exceeds the limit: an error message appears and the email isn't sent.
- If all the attached files are within the limit, but combined they exceed the limit: the attached files are split between several emails – for example, if the limit is 6MB, two emails may be sent:
- one email with three attachments totalling less than 6MB
- one email with one attachment totalling less than 6MB
- If you're combining this feature with the Merge attached files as a PDF file feature, the size of the merged PDF mustn't exceed the limit, otherwise an error message appears and the email isn't sent.
Define which document version to use for the merged PDF
If your library administrator has set up this advanced feature, there's a property that lets you define which version of your document to use to generate your PDF.
The property can take the following values:
-
HEAD
(default): the most recent version that exists
Note: If your document has been checked out, the most recent version is the draft version.
-
COMMITTED
: the last version that was published
Note: If your document has been checked out, the last version that was published is the main version.
- A previous version ID: learn how to identify the version ID