Sample code for 30+ languages & platforms
Xbase++

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.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oImap
LOCAL cRawResponse

nSuccess := 0

//  This example assumes the Chilkat API to have been previously unlocked.
//  See Global Unlock Sample for sample code.

oImap := CreateObject("Chilkat.Imap")

//  Connect to they Yahoo! IMAP server.
oImap:Port := 993
oImap:Ssl := 1
nSuccess := oImap:Connect("imap.mail.yahoo.com")
IF (nSuccess != 1)
    ? oImap:LastErrorText
    oImap:destroy()
    RETURN
ENDIF

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

cRawResponse := oImap:SendRawCommand('ID ("GUID" "1")')
IF (oImap:LastMethodSuccess != 1)
    ? oImap:LastErrorText
    oImap:destroy()
    RETURN
ENDIF

//  Login
nSuccess := oImap:Login("myLogin", "myPassword")
IF (nSuccess != 1)
    ? oImap:LastErrorText
    oImap:destroy()
    RETURN
ENDIF

? "Login Success!"

//  Select an IMAP mailbox
nSuccess := oImap:SelectMailbox("Inbox")
IF (nSuccess != 1)
    ? oImap:LastErrorText
    oImap:destroy()
    RETURN
ENDIF

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

//  Disconnect from the IMAP server.
nSuccess := oImap:Disconnect()

oImap:destroy()