View Full Version : How to email

August 8th, 2010, 05:17 PM
Maybe someone can help me with this.

I want my PC to email the results of running a command like lsusb every 24 hours. How would I go setting this up?


August 8th, 2010, 05:27 PM
command | mail -s Subject foo@bar.org

Put that in a cron job, either directly or in a shell script if you want to so something more complex.

August 8th, 2010, 08:46 PM
Thanks Bachstelze I'm going to try that out

August 8th, 2010, 08:48 PM
Thanks Bachstelze I'm going to try that out

Your system must be properly configured to send email, though. If you want a quick and easy way, use ssmtp and configure it to use the SMTP server of your ISP.

August 8th, 2010, 09:46 PM
Very cool! I got it to work! Thanks for tips

Installed ssmtp, then created a simple cron job that looks like this

00 10 * * * mythtv-status

Now I get an email that will tell me what is being recorded for the day.