Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

fMailbox and message flags

posted by philip 8 years ago

Hello,

I've run into a problem where the native IMAP functions are not installed on a server so I went looking for a library to fill the need. On my search, I ran into Flourish. During testing I found the fMailbox library to work much quicker than the native functions (a VERY noticeable difference).

Overall I like how fMailbox works but it seems there is no support for the flags which go along with the messages. Being able to check for unread messages would be a wonderful thing since not everyone deletes the messages from their inbox (myself included).

Thanks.

I found that fMailbox suites my project's needs better than any other library I found except for missing message flags. I started looking into adding flags support and found that only two changes are needed to make it show up in fMailbox (line numbers are from version 1.0.0b11):

1) On line 1201, in the listMessages() function, update the FETCH request by replacing 'ENVELOPE' with 'ENVELOPE FLAGS'

2) On line 1210, add: $info'flags' = $details'flags';

(sorry for the extra spacing but the line was being filtered out before I added the space)

The flags will now show up as a message detail indexed as 'flags' when listing the messages.

Thanks for the work on the library.

posted by philip 8 years ago