Faxing Text of any Character Set
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 text of any character set.
Download the ASP project files.
Note:
- 1. If you only need to fax ASCII text (i.e., no special character set), you can use the simpler sample describing how to Send a Textual Fax
- 2. 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 Stream_StringToBinary(Text, CharSet)
Const adTypeText = 2
Const adTypeBinary = 1
'Create Stream object
Dim BinaryStream 'As New Stream
Set BinaryStream = CreateObject("ADODB.Stream")
'Specify stream type - we want To save text/string data.
BinaryStream.Type = adTypeText
'Specify charset For the source text (unicode) data.
If Len(CharSet) > 0 Then
BinaryStream.CharSet = CharSet
Else
BinaryStream.CharSet = "us-ascii"
End If
'Open the stream And write text/string data To the object
BinaryStream.Open
BinaryStream.WriteText Text
'Change stream type To binary
BinaryStream.Position = 0
BinaryStream.Type = adTypeBinary
'Open the stream And get binary data from the object
Stream_StringToBinary = 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"