-1

I am working on .Net MVC project. Is there any way to get the back response from Fax machine when fax is sent. Is there any API that I have to integrate in MVC to send FAX and get the acknowledgement back. Please help. Thanks in advance

I have gone through one post but didn't get anything

Send fax from ASP.NET MVC application

Community
  • 1
  • 1
nitin thakur
  • 11
  • 1
  • 3

1 Answers1

0

Like your referenced thread indicated, you really need to use a third-party tool for this. We use RightFax; their API allows me to do exactly what you are asking with very little effort.

To send a fax:

    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 page that shows a transmission log:

fax log

mr_plum
  • 2,448
  • 1
  • 18
  • 31