Reply to topic
Checking for unread mail messages
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 550
Location: Harrisburg, PA
Reply with quote
I've been trying to accomplish this for quite sometime with no success, so I figured I would throw this one out there.

Has anyone ever, using ColdFusion, gotten an UNREAD message mail count from a POP3 or IMAP server?

<cfpop> will only give you a list of all messages in your inbox.

I have read that if you give a LIST command to a POP server it will return a list of messages and each message will have a unique ID. That ID is guaranteed to be unique through different sessions. So if you store a list of IDs on the client side, you can determine if a message is new. And if it is new, it is unread.

But I haven't gone to that extent yet. Confused

Any suggestions? Question
How about this...
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 550
Location: Harrisburg, PA
Reply with quote
Let me also extend this..

I use SmarterMail webservices and haven't seen the functionality as far as checking for messages. Can I maybe get the info via a SmarterMail webservice call? (Thinking maybe there are 'undocumented' functions.)
IMAP
comprug
Forum Regular

Joined: 15 Feb 2006
Posts: 343
Reply with quote
Jason, I once tried to do the same thing. What I found out was that with POP, there is no built-in framework - I would check messages in Thunderbird, but smartermail would still show them as unread. Smartermail uses it's own db. Don't quote me on this, but I believe IMAP supports querying whether it has be read. If you are willing to update to premium mail this could be an option.
Re: IMAP
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 550
Location: Harrisburg, PA
Reply with quote
comprug wrote:
Jason, I once tried to do the same thing. What I found out was that with POP, there is no built-in framework - I would check messages in Thunderbird, but smartermail would still show them as unread. Smartermail uses it's own db. Don't quote me on this, but I believe IMAP supports querying whether it has be read. If you are willing to update to premium mail this could be an option.


Thanks for the tip. I do have premium mail on all my accounts, but unfortunately ColdFusion does not have an IMAP function (where as Blue Dragon has <cfimap> which does what I want)

There is a company that sells a custom tag <cfx_imap> but I'm not about to spend money on it, and I just don't have the time to create one either. Confused
CF8?
comprug
Forum Regular

Joined: 15 Feb 2006
Posts: 343
Reply with quote
Jason, I guess CF8 might have it, but that could be too long a wait...
What I recommend is that you write a PHP script to do it, or even better, Ruby, if it's installed. If you can do Ruby, I send you a script. I am working on Ruby and IMAP for a script I'm working on called spamsniffer. Here's a simple Tutorial for PHP IMAP: http://www.devarticles.com/c/a/PHP/Create-Your-Own-Mail-Script-With-PHP-and-IMAP/
Thanks, Ben
Checking for unread mail messages
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic