I am trying to send an HTML mail through PHP, but I can\'t seem to get it working.
This is my code:
// multiple recipients
$to = \'mail\';
I don't think you have to put the To: line in the header as it is a parameter of the mail function.
However some mail clients don't like light headers, here's mine which is working:
$header = 'From: "Contact" '.PHP_EOL.
'Reply-to: '.PHP_EOL.
'MIME-Version: 1.0'.PHP_EOL.
'Content-Type: text/plain; charset=utf-8'.PHP_EOL.
'Content-Transfer-Encoding: 8bit'.PHP_EOL.
'X-Mailer: PHP/'.PHP_VERSION.PHP_EOL;