Getting New Email Message counts

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
terencepjf
Newbie
Posts: 15
Joined: Wed Dec 19, 2007 9:16 pm

Getting New Email Message counts

Post by terencepjf » Sun Dec 14, 2008 4:01 pm

Hi; does anyone know a way to get a count of New Email messages:

1) Without downloading all the messages
2) Count of messages in Inbox Sub-Folders

RetrievePOP3 works but the files need to be downloaded and no subfolders messages can be retrieved.

Thanks in advance

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Dec 14, 2008 4:56 pm

Use the Telnet commands. POP3 is just telnet. Telnet to port 110 and issue the LIST command to get the number of messages waiting.

http://jameser.blogspot.com/2006/06/tip ... elnet.html
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Dec 18, 2008 1:42 pm

Easier is to use the STAT command. I have blogged a solution here:

http://www.mjtnet.com/blog/2008/12/18/t ... age-count/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Apr 27, 2012 9:13 pm

Thank you for this blogged example... very helpful (3.5 years after posting).

I want to make one point to save the next person a little time.

Do the command prompt telnet session sample from the blog first. Your telnet session might not provide the same response as Marcus' telnet session. The TelnetWaitFor> function is waiting for specific text. If your telnet session displays different text, your logon attempt will fail.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts