Jump to content

Email sending to many headers


WeBBy421

Recommended Posts

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...

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.