7

将 RightFax 与 .NET/C# 集成起来有多容易?我们也在考虑 FaxMan、Windows Fax Server,但我们遇到了 RightFax。我们基本上需要能够通过 .NET App 发送传真、监控状态等。

4

3 回答 3

12

这是使用 Right Fax COM API 库 (rfcomapi.dll) 的其他答案中 RightFax 发送传真的一些示例代码。

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();
于 2010-09-09T18:34:05.817 回答
2

Fuel9有一个名为 Boomerang 的通知框架,它支持 Windows 传真服务器。该框架有一个数据库接口,因此它支持.Net 和任何其他可能连接到数据库服务器的东西。我看到他们也在开发 Rightfax 扩展,但我们的基础架构中只有 MS 传真。Boomerang 一直为我们工作得很好,只需很少的 sql 语句就可以创建自动传真(或电子邮件、打印、ftp 等)解决方案。

/乙

于 2010-10-19T16:51:33.893 回答
1

还可以考虑在 Windows 中使用传真服务。 使用 C# 使用 Windows 传真服务发送传真

using FAXCOMLib;
using FAXCOMEXLib;

FaxServerClass fs = new FaxServerClass();
fs.Connect(“<your_computer_name>”); //specifies the machinename
object obj = fs.CreateDocument(“<your_filename>”);
FaxDoc fd = (FaxDoc)obj;
fd.FaxNumber = “<your_fax_number_to_send_to”;
fd.RecipientName = “<your_recipients_name”;
int i = fd.Send();
MessageBox.Show(i.ToString());
fs.Disconnect();
于 2010-09-09T18:28:09.903 回答