I am sending out an email but it contains a repeat of some of the headers.
It gets rejected from some servers as having >128 recipients or excessively long headers.
Example:
Reply-To: Webite Name
[email protected], Webite Name
Repeated too many times to count
X-Mailer: PHP/5.4.45From: Webite Name [email protected]
Also repeated too many times to count
Below is my script:
if ($todaydate > $almostdue){
$to2 = "$fname $lname <$email>";
$subject2 = "Your Membership Dues are Expiring";
$headers2 .= "From: Website Name <[email protected]>" . "\r\n";
$headers2 .= "Reply-To: Website Name <[email protected]>" . "\r\n";
$headers2 .= "MIME-Version: 1.0" . "\r\n";
$headers2 .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers2 .= 'X-Mailer: PHP/' . phpversion();
$fromEmail = "[email protected]";
$fifth = "-f" . $fromEmail;
$message2 = "<div style='font-family:arial;font-size:14px;'>
Dear $fname,<br><br>blah, blah,blah</div><br><br>";
mail($to2, $subject2, $message2, $headers2, $fifth);
Any help in why this is happening would be greatly appreciated