Platform SDK: Fax Services

Sending a Fax to One Recipient (Win32 Environment)

A fax client application can call the FaxSendDocument function to queue a job that will transmit an outgoing fax to one recipient, specifying a file stored on disk.

The application must specify one file to transmit and supply a pointer to a FAX_JOB_PARAM structure. The fax server queues the fax transmission job according to the details specified by the FAX_JOB_PARAM structure. The structure includes the recipient's fax number, sender and recipient data, an optional billing code, and job scheduling information.

The application must also supply a pointer to a FAX_COVERPAGE_INFO structure if a cover page is required. This structure contains data to display on the cover page of a fax transmission. For more information, see Sending a Cover Page.

Call the FaxCompleteJobParams function before calling the FaxSendDocument function. FaxCompleteJobParams is a utility function that supplies data for members in the FAX_COVERPAGE_INFO and FAX_JOB_PARAM structures. Call the FaxFreeBuffer function to free the memory associated with these structures.

To send a fax document efficiently to several recipients, an application should call the FaxSendDocumentForBroadcast function, rather than calling FaxSendDocument multiple times. Note that an application must first call the FaxConnectFaxServer function to obtain a fax server handle before calling the FaxSendDocument function and the FaxSendDocumentForBroadcast function.