I am running a PHP script as a cron job. An email is fired iff the script generates an output. Unfortunately, even if it does not output anything, an email is fired with:
Content-type: text/html
How can I get rid of this automatic Content-type: text/html generation triggering an email?
Use the
-qswitch on the php command:This stands for “quiet”, and will prevent php from outputting web headers that it normally would.
Alternatively, if you want to be explicit and more verbose, you can use
--no-header:Source: PHP Manual: Command line options