C# Fax - Get List of Submitted Faxes
In this sample, you retrieve a list of submitted (inbound) C# faxes using the GetList method.
The C# fax API snippet below demonstrates the use of the inbound Web service's GetList method, and returns information for a number of submitted faxes:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GetList { class Program { static void Main(string[] args) { string username = "my username"; string password = "my password"; int maxItems = 100; interfax.MessageItem[] faxMessages = null; interfax.Inbound ifws = new interfax.Inbound(); long st = ifws.GetList(username, password, interfax.ListType.NewMessages, maxItems,ref faxMessages); Console.WriteLine("Result is: " + st); if (faxMessages != null) { for (int i = 0; i <= faxMessages.Length - 1; i++) { Console.WriteLine("MessageID: " + faxMessages[i].MessageID + "; Message size: " + faxMessages[i].MessageSize); } } } } }
