You are here: Fax API > Fax Web Service > Code Samples > Simple Fax Transmission from ASP(SendCharFax Method)
Simple Fax Transmission from ASP(SendCharFax Method)
How to send a Simple Fax Transmission from ASP using SendCharFax method.
Download the ASP project files.
<% Set objSoap = Server.CreateObject("MSSOAP.SOAPClient30") 'Create the SoapClient object objSoap.ClientProperty("ServerHTTPRequest") = True 'Set to True when an Active Server Pages (ASP) application or an ISAPI DLL uses the SoapClient object. objSoap.mssoapinit("http://ws.interfax.net/dfs.asmx?wsdl") 'Initializes the SoapClient object using the Web Services Description Language (WSDL) file as input SendFaxResult = objSoap.SendCharFax("MyUsername", "MyPassword", "+1 212 4567890", "This is a sample Fax", "txt") ' Invoke the Interfax method If SendFaxResult > 0 Then Response.Write "Fax submitted. Transaction ID: " & SendFaxResult Else Response.Write "Error sending fax. Return code: " & SendFaxResult End If %>
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"