Receive-POP3-plain-text-part-of-the-message - 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] **

Receive POP3 plain text part of the message
VB code
Dim wodPop3 As wodPop3Com
Set wodPop3 = New wodPop3Com

'First we set up the hostname, login and password for POP3 server.
wodPop3.HostName = "your_pop3_hostname"
wodPop3.Login = "your_pop3_login"
wodPop3.Password = "your_pop3_password"
wodPop3.Blocking = True 'Use synchronous connections
'Then we connect to POP3 server.
wodPop3.Connect
'Using GetAll all messages will be downloaded from server.
wodPop3.Messages.GetAll
'We can disconnect from server now because messages are downloaded.
wodPop3.Disconnect

Dim i As Integer
'We will go though all downloaded messages using Pop3Msgs collection.
For i = 0 To wodPop3.Messages.Count - 1
    Debug.Print ("Message:   " & i + 1)
    Debug.Print ("Subject:   " & wodPop3.Messages(i).Subject) 'Display message subject
    'In order to receive text/plain part of the message we will use PlainText Property.
    Debug.Print ("Plain part: " & wodPop3.Messages(i).PlainText)
Next i
VB.NET code
Dim wodPop3 As New WODPOP3COMLib.wodPop3Com

'First we set up the hostname, login and password for POP3 server.
wodPop3.Hostname = "your_pop3_hostname"
wodPop3.Login = "your_pop3_login"
wodPop3.Password = "your_pop3_password"
wodPop3.Blocking = True 'Use synchronous connections
'Then we connect to POP3 server.
wodPop3.Connect()
'Using GetAll all messages will be downloaded from server.
wodPop3.Messages.GetAll()
'We can disconnect from server now because messages are downloaded.
wodPop3.Disconnect()

Dim i As Integer
'We will go though all downloaded messages using Pop3Msgs collection.
For i = 0 To wodPop3.Messages.Count - 1
    Console.WriteLine("Message:   " & i + 1)
    Console.WriteLine("Subject:   " & wodPop3.Messages(i).Subject) 'Display message subject
    'In order to receive text/plain part of the message we will use PlainText Property.
    Console.WriteLine("Plain part: " & wodPop3.Messages(i).PlainText)
Next i
C# code
WODPOP3COMLib.wodPop3Com wodPop3 = new WODPOP3COMLib.wodPop3Com();

//First we set up the hostname, login and password for POP3 server.
wodPop3.Hostname = "your_pop3_hostname";
wodPop3.Login = "your_pop3_login";
wodPop3.Password = "your_pop3_password";
wodPop3.Blocking = true; //Use synchronous connections
//Then we connect to POP3 server.
wodPop3.Connect();
//Using GetAll all messages will be downloaded from server.
wodPop3.Messages.GetAll();
//We can disconnect from server now because messages are downloaded.
wodPop3.Disconnect();

short i;
//We will go though all downloaded messages using Pop3Msgs collection.
for (i = 0; i <= wodPop3.Messages.Count - 1; i++)
{
    Console.WriteLine("Message:   " + (i + 1));
    Console.WriteLine("Subject:   " + wodPop3.Messages[i].Subject); //Display message subject
    //In order to receive text/plain part of the message we will use PlainText Property.
    Console.WriteLine("Plain part: " + wodPop3.Messages[i].PlainText);
}