cronwrap executes a command and captures the output of stdout and stderr. If the return code of the program is not equal zero the captured output will be printed to stdout resulting in generating a mail when run from cron.