VB.NET Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CUnicode C++Unicode CMFCDelphi DLLDelphi ActiveXFoxProJavaPerlPHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB.NET Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

Read a POP3 Mailbox

Read 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.