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

Andrew Davis

Member
May 23, 2017
11
4
3
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,241
363
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.