Chilkat HOME Android™ ASP Visual Basic VB.NET C# iOS (IPhone) Objective-C C++ C Unicode C++ Unicode C MFC Delphi DLL Delphi ActiveX FoxPro Java Perl PHP Extension PHP ActiveX Python PowerShell Ruby SQL Server VBScript
Read a POP3 MailboxRead a POP3 mailbox and display the FROM and SUBJECT header fields of each email. Download: Chilkat .NET Assemblies ' The mailman object is used for receiving (POP3) ' and sending (SMTP) email. Dim mailman As New Chilkat.MailMan() ' Any string argument automatically begins the 30-day trial. Dim success As Boolean success = mailman.UnlockComponent("30-day trial") If (success <> true) Then MsgBox("Component unlock failed") Exit Sub End If ' Set the POP3 server's hostname mailman.MailHost = "mail.chilkatsoft.com" ' Set the POP3 login/password. mailman.PopUsername = "myLogin" mailman.PopPassword = "myPassword" Dim bundle As Chilkat.EmailBundle ' Copy the all email from the user's POP3 mailbox ' into a bundle object. The email remains on the server. bundle = mailman.CopyMail() If (bundle Is Nothing ) Then MsgBox(mailman.LastErrorText) Exit Sub End If Dim i As Long Dim email As Chilkat.Email For i = 0 To bundle.MessageCount - 1 email = bundle.GetEmail(i) TextBox1.Text = TextBox1.Text & email.From & vbCrLf TextBox1.Text = TextBox1.Text & email.Subject _ & vbCrLf & vbCrLf Next mailman.Pop3EndSession() |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.