Web lists-archives.org

Re: [kde-linux] How to check kmail has some unread mails ?




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

This should also work, however it is a bit slow since the "dcop" executable 
has to be called some many times.

% dcop kmail KMailIface folderList | while read folder; do dcop $(dcop kmail 
KMailIface getFolder $folder) unreadMessages; done

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

Attachment: pgpDBSUZW9Fxz.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.