Introduction
The simplest way, which would require no additional configuration is to add multiple addresses into the contact field in the ERP, so your contact email address would be, for example: "alice@test.com; bob@test.com". However this method is inflexible and difficult to maintain.
Instead, you can use additional fields from the ERP to hold the additional email addresses. These fields need to be available on the document that is to be distributed.
Customer | ABC001 | DEF001 | GHI001 | JKL001 |
Email1 | alice@abc.test.com | diana@def.test.com | gaynor@ghi.test.com | julius@jkl.test.com |
Email2 | bob@abc.test.com | edward@def.test.com | ||
Email3 | charlie@abc.test.com | ingrid@ghi.test.com |
Method 1
Add multiple emails inside ##EMAIL....##
You can build an expression that concatenates the email address fields with a semi-colon separating them, such as:
"##EMAIL " & Email1 & ";" & Email2 & ";" & Email3 & "##"
Which would give the following results
ABC001: ##EMAIL alice@abc.test.com; bob@abc.test.com; charlie@abc.test.com##
DEF001: ##EMAIL diana@def.test.com; edward@def.test.com; ##
GHI001: ##EMAIL gaynor@ghi.test.com; ; ingrid@ghi.test.com##
JKL001: ##EMAIL julius@jkl.test.com; ; ##
Spindle Document Distribution will place each of these into the TO: field of the outgoing email, and any 'empty' addresses will be ignored.
Method 2
Add additional email addresses to their own variable
Identify unused ##VARnn...## commands to use. In the examples below I will use ##VAR10...## and ##VAR11...##.
Assuming that ##EMAIL...## is already present, add two further expressions to hold the second and thrid email addresses, for example:
"##EMAIL " & Email1 & "##"
"##VAR10 " & Email2 & "##"
"##VAR11 " & Email3 & "##"
You can now specify whether the additional emails are to be placed in the TO: CC: or BCC: fields of the email.
To do this, open Spindle Document Distribution Tools, and navigate to the Document Operation, then under Email Settings>Details and check the box for "Send email to these recipients"click to Add a recipient:
Select the recipient type (TO:/CC:/BCC:) and under Address, enter the appropriate command as configured on the document layout, for example:
repeat for the remaining email addresses.
Ensure that "Send to original recipient" is checked, this includes the address set in ##EMAIL...## in the email.
With the above setup, an email to ABC001 would be emailed
TO: Alice@abc.test.com
CC: Bob@abc.test.com
BCC: Charlie@abc.test.com
Use External Data
If the additional email addresses cannot be placed onto the document to be printed, but an analysis code that can be used as a lookup can, then you can use Spindle Document Distribution's External Data functionality to retrieve the email address from another ERP table, a separately held Access database or any other data source accessible using ODBC drivers - see the article
KBA-01-02-005 - External Data for more details
Knowledge Base Article Details
Related Product | Spindle Document Distribution, Spindle Professional |
Reference Number | KBA-01-02-0 |
Document Date | 12/11/2024 |
Original Author | Vince Hodgson |
Document Version | 1.0 |
Last Updated | 12/11/2024 |
Update Author | Vince Hodgson |