-1

我正在开发.Net MVC 项目。发送传真时,有什么方法可以从传真机获得回复。是否有任何 API 必须集成到 MVC 中才能发送传真并获得回执。请帮忙。提前致谢

我浏览了一个帖子,但没有得到任何东西

从 ASP.NET MVC 应用程序发送传真

4

1 回答 1

0

就像您引用的线程所示,您确实需要为此使用第三方工具。我们使用 RightFax;他们的 API 让我可以毫不费力地完成您的要求。

发送传真:

    Private Sub SendViaComApi()
        Try
            Dim faxserver As New RFCOMAPILib.FaxServer()
            faxserver.ServerName = mConfig.ServerName
            faxserver.Protocol = RFCOMAPILib.CommunicationProtocolType.cpNamedPipes
            faxserver.AuthorizationUserID = mConfig.UserId
            faxserver.AuthorizationUserPassword = mConfig.UserPassword
            faxserver.UseNTAuthentication = RFCOMAPILib.BoolType.[False]
            faxserver.OpenServer()

            Dim fax As RFCOMAPILib.Fax = DirectCast(faxserver.CreateObject(RFCOMAPILib.CreateObjectType.coFax), RFCOMAPILib.Fax)
            fax.ToCompany = ToCompanyName
            fax.ToName = ToFaxNumber
            fax.ToFaxNumber = ToFaxNumber
            fax.FromName = mConfig.FromName
            For Each attachment As String In AttachmentFileNames
                fax.Attachments.Add(attachment)
            Next
            fax.UserComments = Comment
            fax.Send()
        Catch ex As Exception
            ErrorHas = True
            ErrorMessage = ex.Message
            If (Not IgnoreErrors) Then Throw
        End Try
    End Sub

显示传输日志的 ASP.NET 页面:

传真日志

于 2013-10-17T13:28:42.387 回答