FaxResourceFaxMode Property |
Namespace: VoiceElements.Client
public static void SendT38Fax() { // 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(); // Set variable for the file to send or receive, you will want your code to deteremine this elsewhere string FaxFile = @"C:\FaxFiles\Faxfile1.tif"; string CleanFaxFile = @"C:\FaxFiles\Faxfile2.tif"; // Clean up the tif file to be sure with a TifToTif call m_TelephonyServer.TifToTif(FaxFile, CleanFaxFile); // Set the protocol or mode to T38 m_FaxResource.FaxMode = FaxMode.T38; // Send the Fax m_FaxResource.Send(CleanFaxFile); } public static void SendNormalFax() { // 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(); // Set variable for the file to send or receive, you will want your code to deteremine this elsewhere string FaxFile = @"C:\FaxFiles\Faxfile1.tif"; string CleanFaxFile = @"C:\FaxFiles\Faxfile2.tif"; // Clean up the tif file to be sure with a TifToTif call m_TelephonyServer.TifToTif(FaxFile, CleanFaxFile); // Set the protocol or mode to "Normal" m_FaxResource.FaxMode = FaxMode.Normal; // Send the Fax m_FaxResource.Send(CleanFaxFile); }