|
Parts: splitting and renaming email attachmentsIn a Control Script, parts can be defined to determine which sections should be output to the same file. This way it is possible to split the Print context or the Web context into multiple email attachments. This topic shows how to do that. For information about Control Scripts in general, see Control Scripts and Control Script API. If you don't know how to write scripts, see Writing your own scripts. Defining partsDefining parts is done by setting the
If no part name is set on any section, it is assumed that there is only one part, consisting of the default section (for Web output) or of all sections (for Print output). The attachment(s) will be named after the email subject. ExamplesNo parts definedAssume there are three Print sections: sections A, B and C. When generating Email output with the Print context as attachment, all three Print sections will be put together in one file and attached to the email. If the email's subject is 'Take action', the name of the attached file will be 'Take action.PDF'. Splitting and renaming a Print attachmentAssume there are three Print sections: sections A, B and C. In a Control Script a part name is defined for section C:
When generating Email output with the Print context as attachment, the email will have two attachments:
For Web sections, a part always consists of only the given
section. Web pages cannot be appended to form a single part. It is however possible to attach multiple Web pages to one email; see Control Script API for an example.
Controlling multiple Email attachmentsThe following script attaches the following sections to an email:
For another example, see this how-to: Output sections conditionally.
|
|