【问题标题】:RightFax and .NET?RightFax 和.NET?
【发布时间】:2011-04-10 09:55:58
【问题描述】:

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

【问题讨论】:

    标签: c# .net asp.net fax rightfax


    【解决方案1】:

    以下是 RightFax 发送传真的一些示例代码,来自 this other answer,使用 Right Fax COM API 库 (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();
    

    【讨论】:

    • 谢谢。我使用的代码与您的代码相同,但在 OpenServer() 或创建传真对象时出现“System.AccessViolationException”错误。任何帮助将不胜感激。谢谢!!
    【解决方案2】:

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

    /B

    【讨论】:

      【解决方案3】:

      考虑在 Windows 中也使用传真服务。 Using Windows Fax Service to Send Fax using C#

      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();
      

      【讨论】:

      • 要使用 Windows 传真服务,我需要什么?只是连接到调制解调器的 Windows Server 2003/2008?然后我可以用 fs.Connect("servername") 连接到服务器对吗?
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-12-29
      • 1970-01-01
      • 1970-01-01
      • 2011-06-07
      • 2012-06-17
      • 1970-01-01
      • 2020-03-27
      相关资源
      最近更新 更多