FFMERGE for E-Mail
FFMERGE can also be used for e-mail documents. When the action line contains a token containing an '@' character its is taken to be an e-mail address instead of a fax phone number. Because FFMERGE does not differentiate between upper and lower case, the e-mail address will become all lower-case. A single merge operation can contain a mix of documents with action lines containing fax numbers and e-mail addresses.
Warning: if you place an e-mail address in a Word document, it may be recognized and automatically converted to a hyperlink, normally in blue underlined text. If rendered to a TIF as blue text, it will not be recognized by FFMERGE because the recognition elements in the text will not be solid black and because it is underlined. Make sure you have disabled automatic hyperlink recognition in the application you use to print to FFMERGE.
To make use of the CopiaFacts retry option where both fax an e-mail numbers are specified and one is used only if the other fails, you can enter both a fax number and an e-mail address on the action line, separated by a semi-colon (;). The sequence is then controlled by the order of the items on the action line.
The FS file produced by FFMERGE will automatically be modified for transmitting an e-mail, by generating an $email_address command rather than a $fax_phone command. You may also need to modify the template commands to add appropriate e-mail commands such as $email_subject and $email_body.
Output file format
As for fax merge, the output from the FFMERGE printer is always a TIF file, which then becomes an attachment to the e-mail. The e-mail subject and body text would normally be supplied from the template commands. However there is also an option, set using a $var_def FFM_EmailToPDF in the template, which specifies that the created TIF document is to be converted to PDF format before the e-mail is transmitted.
E-Mail attachment name
The name of the generated document, TIF or PDF, is based on a unique number generated as the FS file number during the merge operation. If you wish to have a more meaningful name appear when the recipient reads the e-mail message, you can supply a text expression which will be added as a 'name=' clause on the generated $email_attach command. This text, which is entered on a $var_def FFM_IMGname in the template, may take three forms:
•You can specify a constant string, for example attachment.pdf, which will be used for each item.
•You can reference an application-specific variable, for example `sales.pdf, where a variable named SALES is defined in the USR file for the whole merge application. Note the use of the grave accent (`), needed because this variable expression will end up on an $email_attach command.
•You can reference an item-specific variable, for example `surname.pdf, where the variable SURNAME is defined as a merge-variable on the action line, using for example vr=surname <surnamefield> in FFMERGE font.
Note that you are not limited to a single variable in the text expression and you can combine all three of the above items for form the document name that will be transmitted with the attachment.
Additional E-Mail attachments
As with fax transmissions, you can also specify attachment files using at= on the action line. In this case the search for attachments (in the folders defined by $image_locn) is widened to include a document with the supplied document number and an extension of .PDF
Additional E-Mail attachments retain their actual filenames when transmitted.