Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Cron Email as CONTENT_TYPE text/html; charset=utf-8

Discussion in 'E-mail Discussion' started by Andrew Davis, Feb 14, 2018.

Tags:
  1. Andrew Davis

    Andrew Davis Member

    Joined:
    May 23, 2017
    Messages:
    9
    Likes Received:
    4
    Trophy Points:
    3
    Location:
    Trinidad/USA
    cPanel Access Level:
    Website Owner
    Hello,
    Currently I have several Cron jobs that are being run on my server, they were set up via the cPanel interface, Cron Jobs page.

    All emails are being sent as: Content-Type: text/plain; charset=UTF-8

    What is the best way to send all cron email (or a specific cron job's emails) as HTML format?


    I did some research, and found that this line:
    CONTENT_TYPE="text/html; charset=utf-8"

    Can be added to: "/etc/crontab" or "crontab -e"

    Which is supposed to resolve the issue.


    I've tried both options, but no changes are being made to my cron emails.
    The source still shows "text/plain".


    Can someone please suggest the best way to go about doing this on a cPanel/WHM server?

    Should I revert the changes I did to crontab?

    Did I need to reboot my server or apache for changes to take effect?

    Thanks,
    Andrew
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Andrew,

    Are you logged in via SSH as the account username when using the "crontab -e" command? If not, ensure to login as the account username when using that command. Or, simply edit the user's crontab file directly at the /var/spool/cron/username location.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Andrew Davis

    Andrew Davis Member

    Joined:
    May 23, 2017
    Messages:
    9
    Likes Received:
    4
    Trophy Points:
    3
    Location:
    Trinidad/USA
    cPanel Access Level:
    Website Owner
    Hello @cPanelMichael,
    Thanks very much for the guidance.

    I was logged in as root while running the "crontab -e" command.

    I edited the file at the "/var/spool/cron/username" location, and this worked right away.
    Cron emails are being sent in HTML format.

    Thanks again!
    Andrew
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice