![]() ![]() |
|
||||||||
| |
|||||||||
|
Fax2Send Shell API - Queue a Fax/usr/bin/fax2 - Add a new fax request to the queueNAMEfax2 - Queue a Request for facsimile transmission. SYNOPSISfax2 [-qcFER] [-mmail_level] [-nreal_name] [-Hheader_file] [-hheader_line] [-ttime] [-Aanswerback] [-dfax_unit_name] [-Ttag_data] [-larg_file] [-Dprinter] [-pphone_no | -Mmailshot_file] [[[-Ppreformat] file]... | [-]] DESCRIPTIONFax arranges for the named files and associated information (collectively called a request) to be sent as a facsimile message to a remote facsimile machine. If no file names are mentioned, standard input is assumed. The order in which files appear in the command line is the same order in which they will be "faxed". Files can be in any of the following formats:
If a "-" is used instead of a file name then the request is assumed to be a front sheet only. Fax associates a unique id with each request and prints it on the standard output. The id can be used later to cancel (see fax2cancel) or retry (see fax2retry) the request. A phone number should consist of only digits, spaces, the character '-' and the pause character ','. Flags:
Mailshot FilesA mailshot file should have the following format for each line: phone_number header_line or phone_number See below for details of header lines. Cover / Front SheetsA header/front sheet is a merge file that can be prepended to a document prior to transmission. The format of the header line is: /field 1/field 2/......./ To include a / character in a field it should be delimited by a \ character. The data in field n will be pasted into the nth blank field in the header file and any field with the number n inside. More information on cover sheets. Format ScriptsBefore transmitting any file the Fax2Send system first executes a format script to translate the file from its native format to one suitable for faxing. The preformat script used depends on the type of the fax modem transmitting the request and the value given with the -P flag. e.g If a request is to transmitted on a fax modem of type 'make' with format script format then the script to be executed will be /usr/lib/fax2send/Format/make/format. Before executing the script Fax2Send sets up some environment variables:
If no preformat script is specified then the 'default' script is used. ExamplesTransmit the file letter to fax number 0207 123 456 fax2 "-p0207 123 456" letter Transmit the file letter to 0207 123 456 formatted through the landscape preformat. fax2 "-p0207 123 456" -Plandscape letter Transmit the file letter to 0207 123 456 at 6 pm fax2 -t1800 -p0207123456 letter Put a front sheet on the fax and include the ASCII file /tmp/abc123.txt in the header. fax2 -h"/Merge Field 1/Merge Field 2/...." -p0207123456 -Pheader /tmp/abc123.txt Exit Codes
1 Fax queued but daemon not running.
0 Fax queued and daemon running.
-220 No more licenses available.
255 NetServer is down
254 UFXLIB and UFXSPOOL not set OK
253 Cannot obtain uname.
252 Cannot obtain password entry.
251 The env variable UFXLOGIN has been set to a value that
does not match the uid.
250 Cannot obtain password entry.
249 Transmission permission denied.
248 No phone number or argument in wrong place.
247 Cannot access file.
246 Empty file in request.
245 Must use the -h flag if no file names given.
244 Cannot gain access to the queue.
243 -i flag only valid for telex command.
242 Cannot access mailshot file.
241 Bad mailshot file.
240 -p flag only valid for fax command.
239 Invalid phone number.
238 Prohibited number.
237 -g flag only valid for telex command.
236 No name supplied with -n flag.
235 No string supplied with -h flag.
234 No string supplied with -A flag.
233 -P flag in wrong position.
232 No format script given with -P flag.
231 Invalid time.
230 -F flag only valid for fax command.
229 -G flag only valid for the fax command.
228 No name supplied with -d flag.
227 Not defined.
226 Express permission denied.
225 Unknown flag
224 Cannot read list of express users.
223 No string supplied with -H flag.
222 No string supplied with -D flag.
221 No string supplied with -T flag.
220 User licence limit exceeded.
156 Other system error.
|