Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Feb 2010
    Posts
    6

    Default Custom cron email headers

    Hi Folks,

    I have a cron set up in cPanel which sends an email with the results as expected. I'm wondering if there's a way in cPanel to customize the headers of the cron emails. Right now I seem to have no control over them. Eg:

    From: Cron Daemon <root@location.myserver.net>
    Subject: Cron <user@location> php -q /home/user/public_html/fn/fn.sitemap-autoupdate.php

    Ideas for updating these? Cron job works fine - no issue with that.

    Thanks.
    Last edited by linkhostmedia; 02-17-2010 at 09:59 AM. Reason: added signature

  2. #2
    Member
    Join Date
    Feb 2010
    Posts
    6

    Default Re: Custom cron email headers

    After a long wait... bump...

    Anyone have input on this?

    Thanks,
    Jason

  3. #3
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Custom cron email headers

    I'm curious as to what you'd like to customize in the header?

  4. #4
    Member
    Join Date
    Feb 2010
    Posts
    6

    Default Re: Custom cron email headers

    I'd like to change the subject line of the cron email so it's more helpful for my client. Right now, this is my cmd:

    Code:
    curl --silent http://www.example.com/volunteersystem/v_reminder.php
    Which produces this subject in the email:

    Cron <user@server> curl --silent IANA &mdash; Example domains
    I tried this:

    Code:
    curl --silent http://www.example.com/volunteersystem/v_reminder.php 2>&1 | mail -s "Custom Subject" me@example.com
    The above works fine, except if there's no output it still sends a blank email with something like "blank output; I hope that's okay". A normal cron just won't send the email if there's no output from php.

    For some reason php mail() won't work if I'm using php -q so that's why I'm using curl.

    Thoughts?

  5. #5
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Custom cron email headers

    You are able to edit/add the subject and have, but you'd like it to not send a cron email at all if there's no output?

    Sounds like this would be on that script the cron runs to check for changes or updates and then: if/else, if theres changes send, if not, don't. Not sure you can do anything there with a cronjob.

Similar Threads & Tags
Similar threads

  1. Exim, Zendesk and Custom Mail Headers
    By LiNUxG0d in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-03-2011, 09:16 AM
  2. Helo=PcName In Email Headers
    By defiler in forum E-mail Discussions
    Replies: 0
    Last Post: 11-22-2010, 02:08 PM
  3. Return path a email headers
    By Heritz in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 05-20-2007, 10:48 AM
  4. Exim custom hostname headers
    By GetWiredNet in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-12-2004, 01:02 PM
  5. Email ANti-abuse headers?
    By Ronny in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-21-2003, 09:08 PM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube