473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Count Messages in Inbox

Hello all,
I'm coding in Perl. And I'm trying to figure out how to simply count the number of messages in an inbox folder that is already open. i've been playing around with Mail::Box::Manager, but can't seem to put it all together. This is what i have so far:

[HTML]use Mail::Box::Manager;

my $mgr = new Mail::Box::Manager;
my $folder = $mgr -> folder => 'Inbox';

my $messages = $folder->messages;[/HTML]

I have no idea if i'm on the right track or not. but i thought the last line would give me the number of messages.

Help please!

Terra
Nov 14 '07 #1
1 2085
numberwhun
3,509 Expert Mod 2GB
Hello all,
I'm coding in Perl. And I'm trying to figure out how to simply count the number of messages in an inbox folder that is already open. i've been playing around with Mail::Box::Manager, but can't seem to put it all together. This is what i have so far:

[HTML]use Mail::Box::Manager;

my $mgr = new Mail::Box::Manager;
my $folder = $mgr -> folder => 'Inbox';

my $messages = $folder->messages;[/HTML]

I have no idea if i'm on the right track or not. but i thought the last line would give me the number of messages.

Help please!

Terra
First, if you haven't already, you may want to read the Mail::Box Overview as is suggested in the other Mail::Box modules. If you look in that overview, you will see reference to another module called Mail::Box::File. To do what you are asking, you may want to check out that module.

Unfortunately, I have not played with any of these modules, but that is just my take on it.

Regards,

Jeff
Nov 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jason Ferree | last post by:
I am trying to loop through all messages in the inbox. To do something, in my case, look for and save attachments. It is telling me that items is not a collection. I've tried everything I can...
0
by: BL | last post by:
Hi all, I've got a number of sub-folders in my Outlook Express Inbox. I've also set up a number of message rules to make sure that email from particular individuals/organisations are moved to...
5
by: =?Utf-8?B?RXJyb2w=?= | last post by:
I have messages in inbox.mbx from a CD copied from an old win 95 computer which I want to import to Win XP OE. Tried OE import, no go! The .mbx file type must be the problem. Is there a work around...
2
by: salad | last post by:
I have the following code. Dim Olapp As Object Dim Olmapi As Object Dim Olfolder As Object Set Olapp = GetObject(, "Outlook.Application") 'get reference Set Olmapi =...
1
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hi Everyone, I am still having trouble with my hotmail inbox messages with the scroll bar..... I have a hotmail account ( Windows Live Beta), when I open my e-mails I sometimes would like to...
3
by: paitoon | last post by:
I want to know how to count messge unread in inbox,And how can the message that was not read will be the read color and after read it will be the normal color as read messages? How it work and what...
1
by: CodeSeeker | last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4...
2
by: SteveC | last post by:
Hello, I am trying to use POP3_SSL class of the poplib module to read email from my gmail account. I can connect just fine using the example here http://www.python.org/doc/lib/pop3-example.html...
1
by: =?Utf-8?B?RGVsbCBVc2Vy?= | last post by:
Some how I lost my inbox, sent messages, deleted messages, etc. How do I get them back? Walt
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.