E-Mail dispatch


Documents created in Word can be sent directly via e-mail. This document function configures the Send button in the OneOffixx ribbon in Word.

OneOffixx knows two modes, depending on whether the document function is attached to the template or not:

  1. Without the document function "E-Mail dispatch" the standard function of Word is called. Outlook is started via IMAPI interface and a copy of the Word document is attached. Neither document content nor content of the e-mail can be influenced. Depending on the e-mail program, the e-mail will be empty after opening.

  2. If the document function "E-Mail dispatch" is attached to the template, the user has the possibility to select an e-mail template (this template must be stored in OneOffixx as a template of the type "Mail Template"). They can choose if logo, stamp etc. should be shown or hidden. Additionally they can choose if the document should be sent as PDF, XPS or as Word. Within a company it also makes sense to first save the document on a shared drive and only send the link.

CAUTION
Also in this case a link to a copy is sent and never a direct link to the original document. The reason for this is that logos etc. may also be handled differently in this document than in the original document.

If the selected e-mail template contains configured e-mail addresses, these are used for the e-mail.
If you want to use the email addresses from the document, the corresponding field in the template must be left empty or you use the configuration <Recipient fromDocument="true" />.

How it works:

 


Configuration without explanations

<Configuration> <RecipientGroup domains="*"> <DefaultOptions> <Extension>.pdf</Extension> <EmbeddedType>Attachment</EmbeddedType> <Attachment> <Text saved="false"> <Binding><![CDATA[//*[@id = 'DocParam.Subject']]]></Binding> </Text> <DraftAddition type="suffix"><![CDATA[ [Entwurf]]]></DraftAddition> </Attachment> <Link> <Text><![CDATA[LinkedDocument]]></Text> <DraftAddition type="suffix"><![CDATA[ [Entwurf]]]></DraftAddition> </Link> <Subject> <Text><![CDATA[Send File]]></Text> <DraftAddition type="suffix"><![CDATA[ [Entwurf]]]></DraftAddition> </Subject> <Recipient fromDocument="false" /> <MailTemplate>5bf2d50e-202d-4c79-bd76-d1bbf5af9046</MailTemplate> </DefaultOptions> <Content logo="On" fax="Off" draft="FromDocument" vectorSignature="FromDocument" campaign="FromDocument" /> </RecipientGroup> </Configuration>

Configuration with explanations

<Configuration> <!-- ↓ Recipient group (allowed: "*" for all domains / single domains: multiple domains are separated with semicolons (e.g. "sevitec.ch;oneoffixx.com") --> <RecipientGroup domains="*"> <DefaultOptions> <!-- ↓ File format that is sent by default (allowed: ".pdf", ".xps" und ".docx" --> <Extension>.pdf</Extension> <!-- ↓ Method, how the file should be sent by default (allowed: "Attachment" = as attachment / "Link" = as link to a file path). --> <EmbeddedType>Attachment</EmbeddedType> <!-- ↓ Configuration for sending files as attachments --> <Attachment> <!-- ↓ attachment name (allowed: saved="true" (applies if document has already been saved), saved="false" (applies if document has not yet been saved), "saved" can also be omitted --> <Text saved="true"> <!-- [Binding or fixtext] → can contain: --> <Binding><![CDATA[//*[@id = 'DocParam.Subject']]]></Binding> </Text> <!-- ...or fixtext directly: --> <Text saved="false"> <![CDATA[FIXTEXT]]> </Text> <!-- ↓ Additional text of the attachment, if draft mode is active. Allowed: type="prefix" for prefixed or type="suffix" for suffixed --> <DraftAddition type="suffix"> [Binding or fixtext] </DraftAddition> </Attachment> <!-- ↓ Configuration for sending files as a link --> <Link> <!-- ↓ Suggested file name. Allowed: saved="true" (applies if document has already been saved), saved="false" (applies if document has not been saved yet), 'saved' can also be omitted --> <Text> [Binding oder Fixtext] </Text> <!-- ↓ see above --> <DraftAddition type="suffix"> [Binding oder Fixtext] </DraftAddition> </Link> <!-- ↓ Email subject configuration --> <Subject> <!-- ↓ Suggested subject. Allowed: saved="true" (applies if document has already been saved), saved="false" (applies if document has not been saved yet), 'saved' can also be omitted --> <Text> [Binding oder Fixtext] </Text> <!-- ↓ see above --> <DraftAddition type="suffix"> [Binding oder Fixtext] </DraftAddition> </Subject> <!-- ↓ Configuration whether the recipient data should be taken from the document or from the mail template. --> <Recipient fromDocument="false" /> <!-- ↓ Configuration which mail template is used --> <MailTemplate>5bf2d50e-202d-4c79-bd76-d1bbf5af9046</MailTemplate> </DefaultOptions> <!-- ↓ Configuration of default values for logo (logo), stamp (fax), draft stamp (draft), signature images (vectorSignature) and campaign (campaign) on / off. (allowed: 'On' for always on, 'Off' for always off or 'FormDocument' for taking over the state from document. --> <Content logo="On" fax="Off" draft="FromDocument" vectorSignature="FromDocument" campaign="FromDocument" /> </RecipientGroup> <!-- ↓ Example configuration for additional RecipientGroup --> <RecipientGroup domains="sevitec.ch;oneoffixx.ch;sevitec.com;oneoffixx.com"> <DefaultOptions> <Extension>.docx</Extension> <EmbeddedType>Link</EmbeddedType> <Attachment> <Text saved="true"> <Binding><![CDATA[//*[@id = 'DocParam.Subject']]]></Binding> </Text> <Text saved="false"><![CDATA[MyUnsavedDocument]]></Text> <DraftAddition type="suffix"><![CDATA[ [Entwurf]]]></DraftAddition> </Attachment> <Link> <Path saved="true"><![CDATA[U:\Transfer]]></Path> <Path saved="false"><![CDATA[U:\Transfer]]></Path> <Text saved="true"> <Binding><![CDATA[//*[@id = 'DocParam.Subject']]]></Binding> </Text> <Text saved="false"><![CDATA[MyUnsavedDocument]]></Text> <DraftAddition type="suffix"><![CDATA[ [Entwurf]]]></DraftAddition> </Link> <Subject> <Text> <Binding><![CDATA[//*[@id = 'DocParam.Subject']]]></Binding> </Text> <DraftAddition type="suffix"><![CDATA[ [Entwurf]]]></DraftAddition> </Subject> <MailTemplate>5bf2d50e-202d-4c79-bd76-d1bbf5af9046</MailTemplate> </DefaultOptions> <Content logo="On" fax="Off" draft="FromDocument" vectorSignature="FromDocument" campaign="FromDocument" /> </RecipientGroup> </Configuration>

Scripts

Scripts can also be used in e-mail templates. For this, there are the following points to consider:

Direct call:

When calling an e-mail template directly (double-clicking an e-mail template in the OneOffixx Client), the scripts behave as follows:

  • The script results that can be inserted in the e-mail template content come from the document function "Scripts" of the e-mail template.

  • The scripts are not re-evaluated in case of updates (profile change or language change) in the e-mail.

Call via document function "E-Mail dispatch":

In this scenario, we have a content template with scripts. The content template has the document function "E-Mail dispatch" attached to it. A document is generated from the content template, then "Send" is clicked in the OneOffixx ribbon. An e-mail template is selected in the dialog. The scripts now behave as follows:

  • The script results that can be inserted in the content of the e-mail template come from the document function "Scripts" of the content template.

  • The scripts are not re-evaluated for updates (profile changes or language changes) in the e-mail.

Consequence: requirements for script configurations in mail templates

It now follows that scripts inserted into e-mail templates must be defined in the following locations:

  • In the script document function of the e-mail template.

  • In the script document function of all content templates where the document function "E-Mail dispatch" is attached (or in one of all preceding templates)

PrimeSoft AG, Bahnhofstrasse 4, 8360 Eschlikon, Switzerland