Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2010, 09:50 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default IMAP and recent messages.

Hi all,

How to retrieve ONLY recent messages (unread messages) using Indy TIdIMAP4?
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #2  
Old 10-05-2010, 10:53 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,335
Default

Not much experience with the TidIMAP4, but there should be a MailBox property which you can use...

For example, it has the UnseenMsgs and FirstUnseenMsg properties... Perhaps you can do something with them...

Before this works it seems important to call the StatusMailBox on the TidIMAP4, something like:
Code:
if IdIMAP4.SelectMailBox('inbox') and IdIMAP4.StatusMailBox('inbox', idImap4.MailBox) then 
begin
  ... 
end;
Documentation on the TidMailBox
Documentation on the TidIMAP4
Reply With Quote
  #3  
Old 10-05-2010, 02:36 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default

Thanks Norrit, I already have the code to read all messages and by viewing the documentation link that you post I think I know how to do it, but I have to wait until tomorrow to test it. I will get back to you on this. Thanks again.
__________________
Regards,
Abdulaziz Jasser

Last edited by Jasser; 10-05-2010 at 02:57 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.