I\'m getting exclamation points in random spots in the result of this PHP email function. I read that it\'s because my lines are too long or I have to encode the email in Ba
The answers here have the correct information regarding the line length, however none of them provided me with the sufficient code snippet to fix the issue. I looked around and found the best way to do this, here it is;
".$eol;
$headers .= "Content-Type: multipart/alternative; boundary=\"$separator\"".$eol;
$headers .= "--$separator".$eol;
$headers .= "Content-Type: text/html; charset=utf-8".$eol;
$headers .= "Content-Transfer-Encoding: base64".$eol.$eol;
// message body
$body = rtrim(chunk_split(base64_encode($html)));
mail($email, $subject, $body, $headers);
// ==============================================