Deliver Configuration

Top  Previous  Next

Deliver Configuration

 

The deliver.ini file contains configuration information for the deliver command and deliver() code block function.  The file contains a [default] section, an [email] section, and one or more fax definition sections.  The [default] section contains a fax= line that specifies which fax definition section is used.  It also contains logging parameters.

 

A fax definition indicates the type of interaction that is required, command line, email (SMTP), or the internal msfax option, which utilizes the Windows Support Server to send faxes via Microsoft Fax.  Each configuration line can contain optional and required tags, which are substituted at runtime with tag values specified in the deliver command or deliver() code block function.  Tags are used to specify fax numbers, subject lines, recipient names, and other values, and the values from the commands are mapped to the configuration each time a delivery is performed.

 

There are five pre-defined tag names that can be used in the configuration.

 

Tag

Usage

%to

Fax number or email address.

%faxfile

File to be sent (the output from UnForm, typically of a subjob).  The deliver command manages this value automatically.  The deliver() function has a file name argument that this tag references.

%errfile

An error file, which if used and contains content will be returned in the errmsg$ argument of the deliver() function.  UnForm generates the file name automatically, and then expects to find error messages, if any, in the file when the fax or email is submitted.

%rspfile

A response file, which if used and contains content will be returned in the response$ argument of the deliver() function.  UnForm generates the file name automatically, and then expects to find messages, if any, in the file when the fax or email is submitted.  For example, this might be the standard output of a vfx command line, which can contain a fax job number.

%attach

Used for additional documents beyond the %f file.  All attach tags are accumulated, with space delimiters for command methods, and comma delimiters for email methods, then the entire list is substituted for the %attach marker.  The msfax method does not support attachments.

 

Additional tags are referenced with a %name syntax, and are substituted from the tag options provided by the deliver command or deliver() function.  Optional tags are specified using a { %name } syntax, where a tag and any text can be specified inside the curly braces.  After all %name substitutions have occurred, any remaining {…} sequences that contain %name tags are removed before the delivery is actually executed.

 

When the deliver command generates a document for delivery, it does so with an UnForm subjob.  When delivering to an email address, the subjob always produces a pdf file.  When delivering to a fax number, the type of file is configured with the format=pcl|pdf|ps line.  When executing the subjob, several command line options are automatically managed.  The fax configuration section can specify additional options, as can the deliver command itself.

 

Below are commented examples of sections:

 

Default section

This example [default] section specifies that the vsifax fax definition will be used for faxing.  Daily delivery log files will be placed in the deliver subdirectory under the UnForm server, tags will be logged in addition to basic delivery data, and log files will be retained for 30 days.

 

[default]

fax=vsifax

#fax=msfax

logdir=./deliver

logtags=1

logage=30

 

Email section

This [email] section defines a To: header format with an optional quoted name and the to address.  The name can be supplied via a name="value" tag in the deliver command or function.  If not supplied, then the To: header will just have the email address, automatically supplied as the "to" tag.

 

Other values can be supplied via additional tags.  The email will always include a file attachment, as generated by the deliver command or supplied to the deliver function.  In addition, if there are any "attach filename" tags, those files will be attached to the email as well.

 

[email]

to={"%name" }%to

subject={%subject}

msgtxt={%note}

attach=%f{,%attach}

logfile={%logfile}

#otherhead=

#login=

#password=

#server=

# Note, additional options come from [mailcall] section in uf80d.ini,

# or the mailcall.ini file.

 

Vsifax section

The vsifax section defines a fax gateway that uses the vfx command to send a fax.  The method is set to "command", indicating that a command line is created and executed.  The command is specified over several lines in the deliver.ini file by using \ at the ends of lines to indicate that the line continues on the next physical line.

 

There are several optional elements, such as name and subject.  If they are supplied as tags in the deliver command or deliver() function, then -t options will be added to the vfx command line.  If not, then those elements are suppressed from the command line.  For example, if one tag was 'name="John Smith"', then there would be a '-t tnm="John Smith"' added to the command line.

 

Standard output is captured in a response file, and error output is capture in an error file.  The use of %r and %e in the command allows the deliver() function to return the command's response or error message.

 

When the deliver command executes the subjob to produce the file to be faxed, it will produce it in pcl format (using a -p pcl option).  In addition, a -nohpgl option will be used.

 

[vsifax]

method=command

command=vfx -n '%to' -F pcl \

{-t tnm="%toname"} \

{-t tco="%tocompany"} \

{-t sub="%subject"} \

{-t fnm="%fromname"} \

{-t fco="%fromcompany"} \

{-t ntx="%note"} \

"%faxfile"{ %attach} \

>%rspfile 2>%errfile

format=pcl

options=-nohpgl

 

Rapidfax section

The rapidfax section shows an example of using a third-party Internet faxing service for sending faxes.  Such services accept email submissions via email.  PDF format is generally supported, and many services offer support for additional document types, meaning you can add additional attachments, such as text files, image files, or Microsoft Office files.

 

The method is specified as "email" to indicate that UnForm will submit faxes by emailing them to the fax service.  The To address for most Internet services is faxnum@service.com.  In the case of Rapidfax, the domain is rapidfax.com.  Rapidfax expects fax submissions from a specific email address, and with a user-configured subject line.  In this example, the From address and subject lines are hardcoded.  There can be a message body, specified by a note tag, and both the submitted file and any other files specified by attach=filename tags are submitted for faxing.

 

[rapidfax]

method=email

to=%to@rapidfax.com

from=you@yourcompany.com

subject=yourpassword

msgtxt=%note

format=pdf

attach=%faxfile{,%attach}

 

Msfax Section

The msfax section specifies the "msfax" method, which is an internal UnForm method that works in conjunction with the Windows Support Server.  The command value specifies tag names documented in the Windows Support Server chapter and the msfax() function.

 

[msfax]

method=msfax

format=pdf

command={toname="%toname %tocompany"}\

{,fromname="%fromname"}{,fromcompany="%fromcompany"}\

{,subject="%subject"}{,note="%note"}{,cover="%coverpage"}