IMAP

This is a discussion on IMAP within the Clipper forums in Programming Languages category; Hi, Can anyone give me an example of how to connect to an IMAP mail server and retrieve the mails from it? The code below successfully logs on but the check for messages returns zero, even though there are four messages on it. The server is using IMAP4 and I am using Geoffs classes. Thanks in advance. Kevin METHOD CheckMessages( ) CLASS MainDialog local oIMAP as CImap local nMails as dword local lSuccess as logic oIMAP := CImap{"imapserver","usaername", "pwd"} oIMAP:Timeout := 5000 lSuccess := oIMAP:LogOn("username", "pwd") if lSuccess oIMAP:GetStatus() nMails := oIMAP:MailCount self DCsleMessages:CurrentText := NTrim(nMails) //lSuccess := oIMAP:GetMail( 1 ...

Go Back   Application Development Forum > Programming Languages > Clipper

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-22-2008, 12:09 PM
Kevin
Guest
 
Default IMAP

Hi,


Can anyone give me an example of how to connect to an IMAP mail server
and retrieve the mails from it? The code below successfully logs on but
the check for messages returns zero, even though there are four
messages on it. The server is using IMAP4 and I am using Geoffs classes.

Thanks in advance.

Kevin

METHOD CheckMessages( ) CLASS MainDialog
local oIMAP as CImap
local nMails as dword
local lSuccess as logic

oIMAP := CImap{"imapserver","usaername", "pwd"}
oIMAP:Timeout := 5000
lSuccess := oIMAP:LogOn("username", "pwd")

if lSuccess
oIMAP:GetStatus()
nMails := oIMAP:MailCount

selfDCsleMessages:CurrentText := NTrim(nMails)

//lSuccess := oIMAP:GetMail( 1 )

endif


RETURN SELF

--

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:23 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.