What I have:
I'm using the PHP mail function to send an email. My headers are as follows:
<?php
$headers = "MIME-Version: 1.0\r\n"
."Content-Type: text/plain; charset=utf-8\r\n"
."Content-Transfer-Encoding: 8bit\r\n"
."From: =?UTF-8?B?". base64_encode($from_name)
."?= <$from_address>\r\n"
."X-Mailer: PHP/". phpversion();
mail($to, $subject, $body, $headers, "-f $from_address");
?>
This code is sourced from an accepted stackoverflow answer: https://stackoverflow.com/a/2801159/835950
My problem:
Spam Assassin is applying a 0.1 penalty for the following reason:
0.1 FROM_EXCESS_BASE64 From: base64 encoded unnecessarily
My question:
How should I modify my headers to avoid this penalty. Do I simply remove the base64_encode function?