Click or drag to resize

FaxResourceSend Method (String)

Sends all of the the specified documents in an array as faxes.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax
public FaxResult Send(
	string[] filenames
)

Parameters

filenames
Type: SystemString
This is an array of the paths and filenames of the document files you would like to send as a Faxes.

Return Value

Type: FaxResult
This method returns a Fax Result. See the enumeration definition for an explanation of all possible results.
Remarks
Getting Your Fax Resource

Before calling this method, you will want to use the Get Fax Resource to acces a Fax Resource object on which to call the receive method. Also note that at any time you may query the Fax Resource Property of the Channel to get access to this object.

Make Sure You Have Fax Licenses

Note that Fax Resources are limited to the number of Fax licenses you have purchased. To obtain licenses, contact Inventive Labs sales. Email us with this link.

Use Tiff File Format - Best Practices

Voice Elements uses Tiff graphic files for transport. It is always a good idea to clean up a Tiff file for transport (get the resolution right and more). We have provided a simple way to do this using the Tiff to Tiff method. You should call this before transport as shown in the sample code below.

Don't Have Tiff Files? Convert Them

Voice Elements uses Tiff graphic files for transport. If you don't have Tiff files to send, we have created simple ways to convert files using the Jpeg to Tiff method and the Pdf to Tiff method. This is shown in the sample code below.

Don't Forget the Fax Result

Although the example below doesn't show this, you may want to switch on the reult and take actions in your application accordingly.

Examples
The example below shows using the returned Fax Resource to Send faxes using your channel. The documetns are stored in an array and sent at once.

Please note that in your production code, you will generally need to handle an New Inbound Call Event to receive a fax or place an oubopund call using a Dial Method call. What is shown below is simply to illustrate the use of the resource and send / receive.

public static void SendFaxArray()
{
    // To get a channel, you must first get a link to a Telephony Server.  You may need to pass a username password here.
    TelephonyServer m_TelephonyServer = new TelephonyServer();

    // Get your channel resource from the server
    ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();

    // Get a Fax Resource for the channel
    FaxResource m_FaxResource = m_ChannelResource.GetFaxResource();

    // Make array to store file name
    string[] FaxFiles = new string[4];

    // Fill Array with files to send
    FaxFiles[0] = @"C:\FaxFiles\FaxFile1.tif";
    FaxFiles[1] = @"C:\FaxFiles\FaxFile2.tif";
    FaxFiles[2] = @"C:\FaxFiles\FaxFile3.tif";
    FaxFiles[3] = @"C:\FaxFiles\FaxFile4.tif";

    // Send all the documents as faxes
    m_FaxResource.Send(FaxFiles);

}
See Also