Page 1 of 1

Problem with mail()

Posted: Thu Nov 03, 2011 2:16 pm
by countrydj
Hi Guys...

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

Code: Select all

	# 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: Select all

$to      = 'dave@swarbrick-racing.co.uk';
but it will NOT send Bcc when the main recipient is:

Code: Select all

$to      = 'ann@in-uk.co.uk';
Has anybody got any ideas why this should happen ???

Any suggestions will be welcome.

John C

Re: Problem with mail()

Posted: Fri Nov 04, 2011 3:35 pm
by Jade
Is that even a valid email address? Also I would check to make sure it's not being caught by a spam filter and that the email address is accepting ANY email. Sometimes it can also have to do with the email server blacklisting your IP.