RightFax and .NET?

Prabhu picture Prabhu · Sep 9, 2010 · Viewed 9.3k times · Source

How easy is it to integrate RightFax with .NET/C#? We are considering FaxMan, Windows Fax Server also, but we came across RightFax. We basically need to be able to send faxes through a .NET App, monitor status etc.

Answer

p.campbell picture p.campbell · Sep 9, 2010

Here's some sample code for RightFax sending faxes, from this other answer, using the Right Fax COM API Library (rfcomapi.dll).

RFCOMAPILib.FaxServerClass faxserver = new RFCOMAPILib.FaxServerClass();
faxserver.ServerName = "ServerName";
faxserver.Protocol = RFCOMAPILib.CommunicationProtocolType.cpNamedPipes;
faxserver.UseNTAuthentication = RFCOMAPILib.BoolType.True;
faxserver.OpenServer();

RFCOMAPILib.Fax fax = (RFCOMAPILib.Fax) faxserver.get_CreateObject(RFCOMAPILib.CreateObjectType.coFax);

// set up your 'fax' object the way you want it, below is just some sample options
fax.ToName = "John Doe";
fax.ToFaxNumber = "4255551111";
fax.ToVoiceNumber = "4255550000";
fax.ToCompany = "ACME";
fax.FromName = "My Company";
fax.FromVoiceNumber = "4255552222";

fax.Send();