Re: [kde-linux] How to check kmail has some unread mails ?
- Date: Tue, 27 Mar 2007 15:06:05 +0200
- From: Kevin Krammer <kevin.krammer@xxxxxx>
- Subject: Re: [kde-linux] How to check kmail has some unread mails ?
On Tuesday 27 March 2007 14:49 +0100, christophe wrote: > Le Mardi 27 Mars 2007 14:41, Kevin Krammer a écrit : > > On Tuesday 27 March 2007 13:59 +0100, christophe wrote: > > > In a script, i'd like to check wether kmail has some unread mails. > > > In order to do so, i found on a mailing list that something like : > > > `cat /home/christophe/.kde/share/apps/kmail/mail/.*.index | grep -c > > > "0000"` would do the trick, but it always returns zero. Where am i > > > wrong ? > > > > If you have been using KMail for a long time, the mails might be in the > > old location > > ~/Mail > > Nope. > > >[...] > > % dcop kmail KMailIface folderList | while read folder; do dcop $(dcop > > kmail KMailIface getFolder $folder) unreadMessages; done > > I've tried it but it doesn't work. Hmm. Try this % dcop kmail KMailIface folderList | while read folder; do dcop $(dcop kmail KMailIface getFolder "$folder") unreadMessages; done As you found out already the first command lists the names of the folders the while loop takes each item and gets the folder's DCOP reference and calls unreadMessages on it. A single step would look like this % FOLDER=$(dcop kmail KMailIface getFolder "/Local/inbox") % dcop "$FOLDER" unreadMessages I am using KMail 1.9.5, maybe this is a newly added method. Cheers, Kevin -- Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring
Attachment:
pgpIN3lytwe4K.pgp
Description: PGP signature
___________________________________________________ This message is from the kde-linux mailing list. Account management: https://mail.kde.org/mailman/listinfo/kde-linux. Archives: http://lists.kde.org/. More info: http://www.kde.org/faq.html.
- Follow-Ups:
- Re: [kde-linux] How to check kmail has some unread mails ?
- From: christophe
- Re: [kde-linux] How to check kmail has some unread mails ?
- From: Peter Humphrey
- Re: [kde-linux] How to check kmail has some unread mails ?
- References:
- [kde-linux] How to check kmail has some unread mails ?
- From: christophe
- Re: [kde-linux] How to check kmail has some unread mails ?
- From: Kevin Krammer
- Re: [kde-linux] How to check kmail has some unread mails ?
- From: christophe
- [kde-linux] How to check kmail has some unread mails ?
- Prev by Date: Re: [kde-linux] How to check kmail has some unread mails ?
- Next by Date: Re: [kde-linux] konqueror: key combination for right mouse click menu?
- Previous by thread: Re: [kde-linux] How to check kmail has some unread mails ?
- Next by thread: Re: [kde-linux] How to check kmail has some unread mails ?
- Index(es):