Perl Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

Perl Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
SMTP
Socket / SSL
Spider
SFTP
SSH Key
SSH
SSH Tunnel
Tar
HTTP Upload
XML
XMP
Zip

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

 

 

 

 

 

 

 

POP3 Support and Debugging

The mailman object has two properties that provide detailed information about what transpired during a POP3 session. The mailman.LastErrorText property may be examined after any Chilkat method call to get detailed information about the last method called on the object instance. It is standard across all components. The LastErrorText will contain information even when a method is successful. When requesting support, it is almost always beneficial to send the contents of the LastErrorText because it is designed to tell us (Chilkat) what transpired during the method call. In many cases you may easily be able to identify the cause of a problem by looking at LastErrorText.

The Pop3SessionLog property provides a detailed record of the raw command sent to the POP3 server and the raw responses received back from the POP3 server. This is an additional source of information to help understand any POP3 issues. If the information in LastErrorText is not enough, Chilkat support will often ask for the contents of the Pop3SessionLog property.

Note: Just because a property has "Log" in the name does not mean it is a file. The Pop3SessionLog property is a string that contains the actual text of the log.

 Chilkat Perl Module Downloads for Windows, Linux, and MAC OS X

use chilkat();

#  The mailman object is used for receiving (POP3)
#  and sending (SMTP) email.
$mailman = new chilkat::CkMailMan();

#  Any string argument automatically begins the 30-day trial.
$success = $mailman->UnlockComponent("30-day trial");
if ($success != 1) {
    print $mailman->lastErrorText() . "\n";
    exit;
}

#  Set the POP3 server's hostname
$mailman->put_MailHost("mail.chilkatsoft.com");

#  Set the POP3 login/password.
$mailman->put_PopUsername("myLogin");
$mailman->put_PopPassword("myPassword");

#  Copy the all email from the user's POP3 mailbox
#  into a bundle object.  The email remains on the server.
# bundle is a CkEmailBundle
$bundle = $mailman->CopyMail();

if ($bundle eq null ) {
    #  The CopyMail failed, examine the LastErrorText
    print $mailman->lastErrorText() . "\r\n";
    exit;
}

if ($bundle->get_MessageCount() > 0) {
    print "Number of messages: " . $bundle->get_MessageCount() . "\r\n";
}
else {
    #  No messages were received.  If you expected to find messages
    #  you may wish to look at the LastErrorText and the Pop3SessionLog:
    print $mailman->pop3SessionLog() . "\r\n";
    print $mailman->lastErrorText() . "\r\n";
}

$mailman->Pop3EndSession();
 

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.