var myContent = myTemplate.getReplacedContentByContactId(vars.get("$field.CONTACTID"), additionalPlaceholders);
----
=== Document generation options
Some aspects of the behavior of the document generation can be controlled by setting the `options` property of the DocumentTemplate with `.setOptions`. Available options differ depending on the DocumentTemplate type, that's why the options are wrapped inside an object. These options can currently be used:
[%header,cols="1,3,2"]
|===
| Option | Description | Supported types
| base64 | Controls if the replaced content will be base64-encoded | txt, html, eml
| onlyBody | If set to true, only the body of an eml will be used as content | eml
|===
When a new DocumentTemplate is created, a default set of options will be loaded depending on the type.
//TODO: explain subtemplates, serial letters, (bulk-)emails