Cron Email as CONTENT_TYPE text/html; charset=utf-8
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
-
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. 0 -
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 0
Please sign in to leave a comment.
Comments
2 comments