Fast-message-peek - 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] **

Fast message peek
VB code
Dim msg As WODMAILBOXCOMLib.Message
Set msg = New WODMAILBOXCOMLib.Message
Dim i As Integer

'Peek method will load message into the memory and provide you basic
'information about the message at very fast speed.
msg.Peek "c:\1.eml"

Debug.Print "Message subject: " & msg.Subject
Debug.Print "Sender: " & msg.From
Debug.Print "Recipient: " & msg.To
Debug.Print "-------"
Debug.Print "Message has " & msg.Parts.Count & " parts"
For i = 0 To msg.Parts.Count - 1
    Debug.Print "* Part " & i + 1 & " has content type " & msg.Parts(i).ContentType
Next i

Debug.Print "Raw message text is: "
Debug.Print msg.Text
VB.NET code
Dim msg As WODMAILBOXCOMLib.Message
msg = New WODMAILBOXCOMLib.Message
Dim i As Integer

'Peek method will load message into the memory and provide you basic
'information about the message at very fast speed.
msg.Peek("c:\1.eml")

Console.WriteLine("Message subject: " & msg.Subject)
Console.WriteLine("Sender: " & msg.From)
Console.WriteLine("Recipient: " & msg.To)
Console.WriteLine("-------")
Console.WriteLine("Message has " & msg.Parts.Count & " parts")
For i = 0 To msg.Parts.Count - 1
    Console.WriteLine("* Part " & i + 1 & " has content type " & msg.Parts(i).ContentType)
Next i

Console.WriteLine("Raw message text is: ")
Console.WriteLine(msg.Text)
C# code
WODMAILBOXCOMLib.Message msg;
msg = new WODMAILBOXCOMLib.Message();
short i;

//Peek method will load message into the memory and provide you basic
//information about the message at very fast speed.
msg.Peek("c:\\1.eml");

Console.WriteLine("Message subject: " + msg.Subject);
Console.WriteLine("Sender: " + msg.From);
Console.WriteLine("Recipient: " + msg.To);
Console.WriteLine("-------");
Console.WriteLine("Message has " + msg.Parts.Count + " parts");
for (i = 0; i <= msg.Parts.Count - 1; i++)
{
    Console.WriteLine("* Part " + (i + 1) + " has content type " + msg.Parts[i].ContentType);
}

Console.WriteLine("Raw message text is: ");
Console.WriteLine(msg.Text);