Sending a Fax

Sending a fax.

To send a fax document to a destination, simply create a FaxSend object and call the SendFax() method. This function requires that at least the DialNumber and FaxImage values have been set.

On return, the initial FaxStatus is provided with a FaxResult of InProgress and a unique JobId to identify the fax transaction. The FaxResult and JobId are used to monitor the transaction to completion. Any FaxResult that is not InProgress is considered a final disposition.

// create fax
var fax = new FaxSend()
    DialNumber = "8565551234",
    FaxImage = File.ReadAllBytes(@"c:\temp\myfax.tif")

// begin sending the fax
var result = client.SendFax(fax);

So the application does not overload the allotted channels for its assigned etherFAX account, it is recommended to call the GetPendingFaxes() method to determine the number of channels available for sending.

// display available channels for sending
var pending = client.GetPendingFaxes();
Console.WriteLine("Channels available: " + pending.AvailableChannels);

FaxSend Field Descriptions

DialNumberstringSpecifies the number to be dialed. This may be a long distance human readable number or E.164 (+18005551234) format.
LocalIdstring(Optional) Sets the fax id (CSID) for the send request. This is the fax CSID displayed by the remote fax system. This field supports up to 21 characters.
CallerIdstring(Optional) Sets the caller id for this send request. Where possible, this number will appear as the calling party/id to the remote system. For maximum effectiveness within carrier networks, a "toll" DID is highly recommended.
TotalPagesint32Specifies the total number of pages in the fax image file.
TimeZoneOffsetstringSpecifies the time zone offset of the originator. This value is used to maintain the local time of the originator in the fax header (i.e. -5 for Eastern Standard Time).
TagstringTag (Optional) Sets a user-defined string associated with the fax request. This string will appear in FaxStatus responses making it easier for applications to track their fax messages. This field supports up to 32 characters.
FaxImagestringContains the base64 encoded string representing the binary image data (tiff, pdf or other supported document format).
HeaderstringSpecifies the header format string displayed at the top of each page of this fax job. Keywords and examples are shown below.
TZstringSpecifies the time zone offset of the originator and functions similar to TimeZoneOffset. However, this parameter also supports Linux style time zones such as "America/Chicago", "America/New_York", etc. Using this parameter overrides the TimeZoneOffset value (if specified) and automatically adjusts for daylight savings for the time zone.

For a more in-depth explanation of all send parameters, please see /outbox API Reference.