# Sending a fax: nfxsend

Demonstrates sending a fax. Use nfxsend to send a fax to a fax terminal or to the nfxrecv demonstration program.

#### Usage

nfxsend [options] filename1 [filename2 [ ... ]]

options are:

Option | Description | Default
--- | --- | ---
-b n | Specifies the AG or CG board number n. | 0
-q | Specifies that the board is a QX 2000 board. | AG/CG board
-s n:m | Specifies the stream and timeslot. | 0:0
-r resolution | Specifies the resolution (low, high, or superhigh). | low
-e encoding | Specifies the encoding (1D, 2D, or MMR). | 1D
-c mode | Specifies the conversion mode: y = yes (NFX_OTF_ALWAYS) m = maybe (NFX_OTF_ONLY_IF_FAIL) n = no (NFX_OTF_NEVER) | m
-p protocol | Specifies the protocol (TCP name). | nocc
-d telno | Specifies the telephone number. | No default.
-w pagewidth | Specifies the page width (A4, B4, or A3). | A4
-E | Specifies that ECM mode is used when encoding is 1D or 2D. | Do not use ECM.
-v | Specifies verbose reporting of event information. | Non-verbose reporting.
-a subadd | Specifies the sub-address. | Not used.
-R modemrate | Specifies the modem type and modem rate: Options are: V17_14400 V17_12000 V17_9600 V17_7200 V29_9600 V29_7200 V27_4800 V27_2400 | V17_14400

#### Description

nfxsend performs the following tasks:

Task | Description
1 | nfxsend sends a fax using NaturalFax and Natural Access functions.
2 | It initializes the Natural Access environment and opens the ADI service with the specified board, stream, and timeslot.
3 | nfxsend creates the fax document queue and enqueues the specified files.
4 | It places the call, sets the transmit parameters, and sends the fax.
5 | While waiting for the NFXEVN_SESSION_DONE event, nfxsend monitors all events and takes appropriate action in case the call is disconnected or a board error occurs.
6 | After the fax is sent, nfxsend releases the call, destroys the document queue and the event queue and closes the context.