Cron mailto field

Discussion in 'General' started by Entangled, Feb 2, 2015.

  1. Entangled

    Entangled Member

    Hello,

    I am a Newbie to both Debian and ISPConfig ... so bear with me since I am in a double learning curve ... I have been running the HSphere on CentOS for years so I am not a total Newbie.

    I have searched the ISPConfig forums for the answer but have only found the same question asked several times and all have gone unanswered.

    How do you set Mailto on the Site's Cron Jobs?

    By default: MAILTO=''

    If this function is not there, how do I get this function added?

    Thank you.
     
  2. sjau

    sjau Local Meanie Moderator

    you can't do it by default. You'd have to use the mail command in the cronjob line e.g.

    Code:
    /var/www/clients/client1/web1/some_script.sh 2>&1 | mail -s "Cronjob Log" [email protected]
    
    Haven't tested it but that should work. " 2>&1 | " redirect stderr and stdouput and pipes it to the mail command.
     

Share This Page