Sales
Click for numbers
Welcome User Tools Developer Tools Prices Help Sign up Login
You are here: Home > Developer Tools > Fax Web Service > Samples > ColdFusion - Fax a binary file

Send a binary file from ColdFusion

With thanks to Hansjoerg Posch of inbox.cc

<!--- set constants --->
<cfset a_str_fax_username = 'username'>
<cfset a_str_fax_password = 'password'>
<cfset a_str_number = 'faxnumber'>

<!--- read file (in this case a word document) --->
<cffile action="readbinary" file="yourfilename" variable="a_str_fax">

<!--- connect ... --->
<cfset a_ws_fax = CreateObject('webservice', 'https://ws.interfax.net/dfs.asmx?WSDL')>

<!--- call the SendFax method --->
<!--- Change 'TXT' below to your actual file type (PDF, DOC, etc.) --->
<cfset a_int_return = a_ws_fax.Sendfax(a_str_fax_username, a_str_fax_password, a_str_number, a_str_fax, 'TXT')>




About | Contact | Privacy | Terms | Partners | Login | System Status

© Interfax Inc