send multiple files to fax in one call using C#

462 Views Asked by At

I want to send multiple file for example (pdf, word and tiff) file to one fax number by calling once send(). I am using FAXCOMLib.FaxServerClass() and FaxDoc for sending fax. for sending one file per Call this is work correctly by i need send multiple file at same time to on fax number.?

FaxServer server = new FAXCOMLib.FaxServerClass();
FaxDoc doc = null;

server.Connect(Environment.MachineName);

for (var i = 0; i <= faxSendingItem.AttachmentList.Count; i++)
    {
       doc = (FaxDoc)server.CreateDocument(faxSendingItem.AttachmentList[i].TempFaxDirectory);
       doc.FaxNumber = faxSendingItem.Sender;
       doc.DisplayName = faxSendingItem.AttachmentList.BySequence(i).FileName;
       response = doc.Send();
      }
server.Disconnect();
0

There are 0 best solutions below