ASP.NET Fax – Send Plain-Text Content with SendCharFax (C# project)

This example demonstrates how to send a plain-text ASP.NET fax using a C# fax API (aspx.cs). This is done using the SendCharFax method.

Note that HTML markup can be used, but text is limited to standard ASCII (no 8-bit characters). Additionally, HTML causes automatic word wrapping, whereas regular text does not.

The ASP.NET fax snippet below uses our C# to submit a plain-text file to the Web service, and indicates if the submission succeeded. The transaction ID (positive number) of the fax indicates submission success, whereas any other return value indicates failure. For more details, see Web Service Return Codes.

string username = "my username";
string password = "my password";
string faxnumber = "+442079876543";
string faxcontents = "This is my text";
interfax.InterFax ifws = new interfax.InterFax();
long st = ifws.SendCharFax(username, password, faxnumber,faxcontents, "txt");
Response.Write("Status is " + st);