Programming Examples

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

C Examples

Bounced Mail
Bz2
Certificates/Keys
Charset
CSV
DKIM / DomainKey
Diffie-Hellman
DSA
Email Object
Encryption
FileAccess
FTP
HTML Conversion
HTTP
IMAP
MHT / HTML Email
MIME
NTLM
POP3
RSA
SMTP
Socket
Spider
SSH Key
SSH
SSH Tunnel
SFTP
Tar
Upload
XML
Zip
Amazon S3

 

 

 

 

 

 

 

 

Yahoo! IMAP (imap.mail.yahoo.com)

(from Wikipedia)

It is possible to get direct IMAP access without signing up for paid access nor using software like YPOPs! or FreePOPs. Yahoo! operates IMAP and secure IMAP servers (imap.mail.yahoo.com in particular), which are globally accessible. However they require a specific, non-standard IMAP command to be sent before login is done, namely: “ID ("GUID" "1")”.
This example demonstrates sending the non-standard IMAP command after connecting but before login.

Downloads:

MS Windows Visual C/C++ Libraries
Linux/CentOS C/C++ Libraries
MAC OS X C/C++ Libraries
Solaris C/C++ Libraries
C++ Builder Libraries
FreeBSD C++ Libraries
HP-UX C++ Libraries
BlackBerry QNX C++ Libraries
#include <C_CkImap.h>

void ChilkatSample(void)
    {
    HCkImap imap;
    BOOL success;
    const char * rawResponse;

    imap = CkImap_Create();

    //  Anything unlocks the component and begins a fully-functional 30-day trial.
    success = CkImap_UnlockComponent(imap,"Anything for 30-day trial");
    if (success != TRUE) {
        printf("%s\n",CkImap_lastErrorText(imap));
        return;
    }

    //  Connect to they Yahoo! IMAP server.
    success = CkImap_Connect(imap,"imap.mail.yahoo.com");
    if (success != TRUE) {
        printf("%s\n",CkImap_lastErrorText(imap));
        return;
    }

    //  Send the non-standard ID command...

    rawResponse = CkImap_sendRawCommand(imap,"ID (\"GUID\" \"1\")");
    if (rawResponse == 0 ) {
        printf("%s\n",CkImap_lastErrorText(imap));
        return;
    }

    //  Login
    success = CkImap_Login(imap,"myLogin","myPassword");
    if (success != TRUE) {
        printf("%s\n",CkImap_lastErrorText(imap));
        return;
    }

    printf("Login Success!\n");

    //  Select an IMAP mailbox
    success = CkImap_SelectMailbox(imap,"Inbox");
    if (success != TRUE) {
        printf("%s\n",CkImap_lastErrorText(imap));
        return;
    }

    //  Continue with whatever you wish to do...
    //  (see other examples..)

    //  Disconnect from the IMAP server.
    CkImap_Disconnect(imap);


    CkImap_Dispose(imap);

    }

Need a specific example? Send a request to support@chilkatsoft.com

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