Upon the completion of a document generated via the server, an automated email can be sent using the <<SendWebEmail>> command. Examples include the delivery of the completed documents to a contact at the firm, or an email notification to a client informing them of the next step in their legal proceedings now that this document has been completed. This means that the template, authored in Word, is not restricted to only one <<SendWebEmail>> command.
An example of the <<SendWebEmail>> command.
Note that this command consists of several parameters, each separated by a comma.
The first 3 parameters refer to the email addresses to which the email should be sent. The first parameter is the address that will appear in the To field in the email, the second is what will appear in the CC field, and the third is what will appear in the BCC field. Email addresses may be hard coded, in which case they would need to be in ‘’, or can be data elements from the template. Data elements do not require ‘’. Multiple addresses may be used, separated with semi-colons.
The 4th parameter refers to the email address from which this email will be sent. Although the email is automatically generated by the XpressDox web server, it will appear to have been sent from the address in this parameter.
The following 2 parameters passed through this command refer to the email itself; the subject and the body. It is useful to build the subject from data elements within the template to make the email more relevant when it arrives in the recipient’s inbox. This can be achieved using the <<concat>> command.
<<SetV('Subject',concat(‘Will for ‘,Full_Name))>> In this example, the value of Subject, which has been set as a variable, will read GetV(‘Subject’). Note that the variable name should appear in ‘’. When the email arrives, instead of the subject being something generic like ‘Will’, it will include the value of Full_Name from the template; ‘Will for Anthony Moor’, making it easier to identify. Note that ‘Will for ‘ is in ‘’ since it is hard coded text; however since Full_Name is a data element from the template, no ‘’ are required.
Making use of a separate html file provides the opportunity to customise the body of the email. Should no file be specified here, the default wording will be used. The <<SendWebEmail>> command refers only to the name of that html file. Text, as well data elements from the template, may be used in the html file to construct the body of the email, but instead of the data elements appearing in the usual << >> delimiters, they need to be in [ ].
The last 3 parameters in the command refer to attachments to be sent accompanying this email; ie. the Word document, the pdf document, and the xml data set respectively. Files which do need be delivered with this email should have the value True; whereas files which do not need to be delivered should have the value False.
Note that the parameters in the command will always be in the following order: To, CC, BCC, From, Subject, Body of file, Word document, pdf document, xml dataset. Hence, should any of the parameters not require values, for example ‘bcc’, they should not be eliminated from the command altogether, but an empty set of ‘’ should appear in the command.
This example means that To contains the value of a data element from the template, there is no bcc value, and the xml dataset file will not be attached to this email.