View Single Post
  #1  
Old 3rd November 2011, 21:31
countrydj countrydj is offline
Junior Member
 
Join Date: Jun 2009
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem with PHP mail()

Hi Guys...

I have a problem that I just done understand.
This is the code that I am using:
Code:
	# SEND EMAIL

//	$to      = 'ann@in-uk.co.uk';
	$to      = 'dave@swarbrick-racing.co.uk';
	$subject = "Web site Enquiry";

	$headers = "From: $email ($name)\r\n";
	$headers .= "Bcc: jc@ukzone.com\r\n";
   	$headers .="Reply-To: $name <$email>\r\n";
   	$headers .="X-Mailer: PHP/ . phpversion()";

	$messages = "Message from:  $name ($email) on $date_time\n\n";
	$messages .= "-----------------------------------------------------------------------------------------------------------------------------------\n\n";
	$messages .= "Remote IP: $remote_ip\n";
	$messages .= "Referer: $referer\n\n";
	$messages .= "Name: $name\n\n";
	$messages .= "Country: $country\n\n";
	$messages .= "Selection: $selection\n\n";
	$messages .= "Message:\n";
	$messages .= "$message\n\n";
	$messages .= "-----------------------------------------------------------------------------------------------------------------------------------\n\n";
	$messages .= "HTTP_USER_AGENT: $client\n\n";
mail($to, $subject, $messages, $headers);
The problem that I have is that the code will send Bcc when I have the main recipient as:
Code:
$to      = 'dave@swarbrick-racing.co.uk';
but it will NOT send Bcc when the main recipient is:
Code:
$to      = 'ann@in-uk.co.uk';
Has anybody got any ideas why this should happen ???

Any suggestions will be welcome.

John C
Reply With Quote
Sponsored Links