Faxing a File (Sendfax Method)

25 Nov 2016 This code sample is deprecated and in process of being removed. Check out our new code libraries and usage documentation on InterFAX @ Github.

ASP project files for faxing a file using SendFax method.

Download the ASP project files.

Note: Please read the note in the sample file, which describes a workaround to a limitation in Microsoft’s Visual Basic Scripting Edition.


 0 Then
    Response.Write "Fax submitted. Transaction ID: " & SendFaxResult
Else
    Response.Write "Error sending fax. Return code: " & SendFaxResult
End If

'*********************************************************

Function ReadBinaryFile(FileName)
  Const adTypeBinary = 1
 
  'Create Stream object
  Dim BinaryStream
  Set BinaryStream = CreateObject("ADODB.Stream")
 
  'Specify stream type - we want To get binary data.
  BinaryStream.Type = adTypeBinary
 
  'Open the stream
  BinaryStream.Open
 
  'Load the file data from disk To stream object
  BinaryStream.LoadFromFile FileName
 
  'Open the stream And get binary data from the object
  ReadBinaryFile = BinaryStream.Read

  'Clean up
  BinaryStream.Close
  Set BinaryStream = Nothing
End Function

%>


'Note: If you are faxing from behind a proxy using MS SOAP v.3, you can use one of the two following options:

'Option 1 - Use automatic detection by:
     objSoap.ConnectorProperty("EnableAutoProxy") = True

'Option 2 - Specify a proxy server:
     objSoap.ConnectorProperty("ProxyServer") = "192.168.0.100"
'and optionally, if the proxy server is password-protected specify:
     objSoap.ConnectorProperty("ProxyUser") = "Proxy Username"
     objSoap.ConnectorProperty("ProxyPassword") = "Proxy Password"