C# Fax - Sending a Plain-Text File Using SendCharFax

Download the C# fax API zip file.

In this sample, you learn how to perform a simple transmission of a fax with C#, using the inbound Web service's SendCharFax method.

Within the downloaded project files you will find this C# fax snippet, which handles the fax transmission, using SendCharFax:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace SendCharFax
{
    class Program
    {
        static void Main(string[] args)
        {
            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");
            Console.WriteLine("Status is " + st);
        }
    }
}