<< Click to Display Table of Contents >>
Creating SUBMIT files
One of the API methods of submitting messages for sending is to create a file in a specific format, termed SUBMIT file format. This is an ASCII text file that usually contains details of the options to use in preparing the message, the recipients of the message, as well as the message text itself. ZSUBMIT files have the .sub file extension.
ZSUBMIT program
The message may then be sent using the ZSUBMIT program. This program may be installed to run continuously as one of the Zetafax server programs, regularly checking a particular directory for the existence of a SUBMIT format file. If one is found then it is interpreted and submitted to the Zetafax server for sending - its progress may then be monitored using the client program as normal.
The ZSUBMIT program submits all messages as a given Zetafax user, and if required will monitor progress of the messages, limiting the number of outstanding messages at any one time or removing any entries which have been sent without errors. Files for sending via the ZSUBMIT program may also contain more than one message for sending - the program will split it into separate messages before submitting it to the server.
Use with API calls
SUBMIT format files are also used by the Application Programmers Interface (API) routines to specify message options and text for sending. These routines allow user written application programs to send messages directly without using either the client or ZSUBMIT program. The ZSUBMIT program itself is written using these routines, and requires the API toolkit license to run.
SUBMIT file format
This section details the format of SUBMIT files, for use with both the ZSUBMIT program and with the API routines. It gives the structure and fields allowed in the file for specifying message options and recipients, and also for formatting the message text.
The SUBMIT file is a standard ASCII text file (multiple lines, each terminated with CR LF). The file contains information about the options to be used in preparing a given message, the recipients, and the message text itself. The format is:
%%[MESSAGE]
Message option lines
Message addressing lines
%%[TEXT]
Text including message text fields
To specify a separate file containing the message to be sent (e.g. to send a graphics file):
%%[MESSAGE]
Message option lines
Message addressing lines
%%[FILE]
Filename, including path
Note: The first line of the file must be "%%[MESSAGE]".
The section headings ("%%[MESSAGE]" and "%%[TEXT]" or "%%[FILE]"), all message option and addressing lines, and the filename (if the second form is used) must start at the left of the line (i.e. there must be no spaces preceding them). Finally, tab characters should not be used in the file - they will be replaced with a space character.
Multiple messages
Files submitted using the ZSUBMIT program may contain information about one or more messages by simply concatenating the files (i.e. the %%[MESSAGE] section for the second message follows the end of the %%[TEXT] or %%[FILE] sections for the first message, etc.). The ZSUBMIT program splits the file into separate messages before submitting them to the server.
Multiple message files
The Zetafax server also supports the sending of multiple message files specified within a SUBMIT file. When a message file is specified in the %%[FILE] section, typically ~SEND000.G3F, .EPN or .TXT in the OUT directory, the Zetafax server will scan for matching files with extension .001, .002 and append these files to the fax message. Additionally, SUBMIT files can also contain more than one %%[TEXT] or %%[FILE] sections, and both ZSUBMIT and the API library functions will generate a series of message files using the new .001 naming convention.
Use with COM and C libraries
SUBMIT files used with the API functions may only contain information for a single message - everything from the first %%[TEXT] command to the end of the file is treated as message text. Certain of the functions only look at one of the two sections - in this case the other section may of course be omitted.