Sample code for 30+ languages & platforms
VBScript

Example: MailMan.FetchAll method

Demonstrates how to call the FetchAll method.

Chilkat VBScript Downloads

VBScript
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

success = 0

success = 0
set mailman = CreateObject("Chilkat.MailMan")

' Setup mailman with POP3 server and login settings...
' ...
' ...

set bundle = CreateObject("Chilkat.EmailBundle")
keepOnServer = 1
headersOnly = 0
' numBodyLines only applies if downloading headers-only.
numBodyLines = 0

success = mailman.FetchAll(keepOnServer,headersOnly,numBodyLines,bundle)
If (success = 0) Then
    outFile.WriteLine(mailman.LastErrorText)
    WScript.Quit
End If

' ...
' ...

outFile.Close