Find-out-message-information-details-inside-mailbox - WeOnlyDo Software example code



All

wodCrypt (12)
wodSSH (10)
wodSFTP (23)
wodSSHServer (1)
wodSSHTunnel (11)
wodSSHpackage
wodSFTPdll

wodSSH.NET (10)
wodSFTP.NET (24)
wodFtpDLX.NET (22)
wodWebServer.NET (10)

wodAppUpdate (13)
wodHttpDLX (8)
wodFtpDLX (22)
wodTelnetDLX
wodFTPServer (3)
wodWebServer (10)
wodVPN
wodXMPP (13)
All ** [Visual Basic] ** [C#] ** [VB.NET] **

Find out message information details inside mailbox
VB code
Dim wodMailBox1 As wodMailboxCom
Set wodMailBox1 = New wodMailboxCom

'First we need to open mailbox.
wodMailBox1.FileName = "c:\mbox"
wodMailBox1.Lock

Dim i As Integer
'Using Messages Collection we can go though messages inside mailbox
'and find out information we want about each message.
For i = 0 To wodMailBox1.Messages.Count - 1
    Debug.Print "Message: " & i + 1
    Debug.Print "From:    " & wodMailBox1.Messages(i).From
    Debug.Print "Subject: " & wodMailBox1.Messages(i).Subject
Next i
VB.NET code
Dim wodMailBox1 As WODMAILBOXCOMLib.wodMailboxCom
wodMailBox1 = New WODMAILBOXCOMLib.wodMailboxCom

'First we need to open mailbox.
wodMailBox1.FileName = "c:\mbox"
wodMailBox1.Lock()

Dim i As Integer
'Using Messages Collection we can go though messages inside mailbox
'and find out information we want about each message.
For i = 0 To wodMailBox1.Messages.Count - 1
    Console.WriteLine("Message: " & i + 1)
    Console.WriteLine("From:    " & wodMailBox1.Messages(i).From)
    Console.WriteLine("Subject: " & wodMailBox1.Messages(i).Subject)
Next i
C# code
WODMAILBOXCOMLib.wodMailboxCom wodMailBox1;
wodMailBox1 = new WODMAILBOXCOMLib.wodMailboxCom();

//First we need to open mailbox.
wodMailBox1.Filename = "c:\\mbox";
wodMailBox1.Lock();

short i;
//Using Messages Collection we can go though messages inside mailbox
//and find out information we want about each message.
for (i = 0; i <= wodMailBox1.Messages.Count - 1; i++)
{
    Console.WriteLine("Message: " + (i + 1));
    Console.WriteLine("From:    " + wodMailBox1.Messages[i].From);
    Console.WriteLine("Subject: " + wodMailBox1.Messages[i].Subject);
}