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
(Perl) Connecting to GMAIL using IMAPDemonstrates how to connect to GMAIL using IMAP.
use chilkat(); $imap = new chilkat::CkImap(); # Anything unlocks the component and begins a fully-functional 30-day trial. $success = $imap->UnlockComponent("Anything for 30-day trial"); if ($success != 1) { print $imap->lastErrorText() . "\r\n"; exit; } # Turn on session logging: $imap->put_KeepSessionLog(1); # Connect to GMail # Chilkat automatically recognizes "imap.gmail.com" and, # because it's so common, automatically sets the port = 993 # and uses a secure SSL/TLS connection. $success = $imap->Connect("imap.gmail.com"); if ($success != 1) { print $imap->lastErrorText() . "\r\n"; exit; } # Login # Your login is typically your GMail email address. $success = $imap->Login('username@gmail.com',"myPassword"); if ($success != 1) { print $imap->lastErrorText() . "\r\n"; exit; } # Select an IMAP mailbox $success = $imap->SelectMailbox("Inbox"); if ($success != 1) { print $imap->lastErrorText() . "\r\n"; exit; } # Show the session log. print $imap->sessionLog() . "\r\n"; # Disconnect from the IMAP server. $imap->Disconnect(); |
© 2000-2013 Chilkat Software, Inc. All Rights Reserved.