Fax VB.NET – Get a List of Inbound Faxes

25 Nov 2016 This code sample is deprecated and in process of being removed. Check out our new code libraries and usage documentation on InterFAX @ Github.
Download the fax VB.NET project files.

The code snippet below uses the GetList method to display information for a list of inbound faxes with VB.NET.


Sub Main()
        Dim username As String = "my username"
        Dim password As String = "my password"
        Dim maxItems As Integer = 100
        Dim faxMessages() As interfax.MessageItem = Nothing
        Dim ifws As New interfax.Inbound
        Dim st As Long = ifws.GetList(username, password, interfax.ListType.NewMessages, maxItems, faxMessages)
        Console.WriteLine("Result is: " & st)
        If faxMessages IsNot Nothing Then
            For i = 0 To faxMessages.Length - 1
                Console.WriteLine("MessageID: " & faxMessages(i).MessageID & "; Message size: " & faxMessages(i).MessageSize)
            Next
        End If
    End Sub