I am generating HTML mails using the following script:
This works exactly as planned, except single spaces are occasionally inserted into the message contents ($t - about 20 rows of text and tables), often interfering with html -or css-elements. How can I circumvent this problem
Code:
$to = '"xxxxxxxx" <' . EXCURSIE . '>';
$bcc = '"xxxxxxxx" <' . WEBMASTER . '>';
$from = '"xxxxxxxx" <' . EXCURSIE . '>';
$subject = 'XXXXXXX: Inschrijving';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: ' . $from . "\r\n";
$headers .= 'Reply-To: ' . $from . "\r\n";
$headers .= 'BCC: ' . $bcc . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $t, $headers);
This works exactly as planned, except single spaces are occasionally inserted into the message contents ($t - about 20 rows of text and tables), often interfering with html -or css-elements. How can I circumvent this problem