Visual FoxPro
Visual FoxPro
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 Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loImap
LOCAL lcRawResponse
lnSuccess = 0
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loImap = CreateObject('Chilkat.Imap')
* Connect to they Yahoo! IMAP server.
loImap.Port = 993
loImap.Ssl = 1
lnSuccess = loImap.Connect("imap.mail.yahoo.com")
IF (lnSuccess <> 1) THEN
? loImap.LastErrorText
RELEASE loImap
CANCEL
ENDIF
* Send the non-standard ID command...
lcRawResponse = loImap.SendRawCommand('ID ("GUID" "1")')
IF (loImap.LastMethodSuccess <> 1) THEN
? loImap.LastErrorText
RELEASE loImap
CANCEL
ENDIF
* Login
lnSuccess = loImap.Login("myLogin","myPassword")
IF (lnSuccess <> 1) THEN
? loImap.LastErrorText
RELEASE loImap
CANCEL
ENDIF
? "Login Success!"
* Select an IMAP mailbox
lnSuccess = loImap.SelectMailbox("Inbox")
IF (lnSuccess <> 1) THEN
? loImap.LastErrorText
RELEASE loImap
CANCEL
ENDIF
* Continue with whatever you wish to do...
* (see other examples..)
* Disconnect from the IMAP server.
lnSuccess = loImap.Disconnect()
RELEASE loImap