I'm writing some code to control a 20x4 char lcd display. One of the things I want to include on it is a count of unread email.
I'm trying to find a simple way of getting this count, without getting overly complicated and having to try and call the mail program with various options. There is probably a simple way that I don't know about but I'm self taught so I miss certain things!
I'm currently using Redhat 8.0 so the mail spools are at /var/spool/mail/username. I only want this program to check the mail for me so I can run it as me so permissions aren't a problem or anything. It is however important that I only get the UNREAD count as I keep a lot of email sitting on the server because I use Squirrelmail talking to an IMAP server.
Thanks in advance,