WeBBy421 Posted January 6, 2016 Share Posted January 6, 2016 Email sending to many headers 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. Since it is only sending to one recipient at a time, the 128 must refer to the headers. Example: Reply-To: Webite Name <info@website.net>, Webite Name Repeated too many times to count X-Mailer: PHP/5.4.45From: Webite Name <info@website.net> 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 <info@website.net>" . "\r\n"; $headers2 .= "Reply-To: Website Name <info@website.net>" . "\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 = "info@website.net"; $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 Why can't I paste anything here? So, had to paste everything as code... Quote Link to comment Share on other sites More sharing options...
benanamen Posted January 6, 2016 Share Posted January 6, 2016 (edited) You are concatenating the first $headers2. $headers2 .= Why are you posting the same exact thing to this forum when you were already provided answers on another site forum? The answers are not going to be any different here. Edited January 6, 2016 by benanamen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.