Mail irregularities after changing hosting providers

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
Hello all,

The website I run uses the mail function to send email to a variety of people in the To: Line, sometimes to a user in the CC: line and always to an admin in the BCC: Line.

This was all working great on my previous hosting solution. However, we recently changed hosts and now the following has occured:

- The To: recipients don't receive the emails
- The CC: recipient doesn't receive the email
- The BCC: recipient DOES receive the email, and in that email all the headers are correct

I was wondering is anyone could come up with some ideas as how to troubleshoot this problem?

Example code follows here:-

-------in config.php-----------
Code:
$mail_to_cash_back = "sales@pitch-invasion.com";
---------------------------------

-------in example.php---------
Code:
	######## Build the message	
		
	$msg .= "<font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">";
	
	$msg .= "<b>£25 Cash Back Referral</b><br><br>";
		
	$msg .= "league_name: $row->league_name<br>";
	
	############ PUT EACH SUBMITTED VARIABLE INTO THE MESSAGE	
		
	      	 foreach($HTTP_POST_VARS as $key=>$value) {
    $msg .= "$key: $value <br>";
	
}	
    $msg .= "</font>";
	
	$msg = str_replace("league_name:","<b>Referrer Details</b><br>league_name:",$msg);
	$msg = str_replace("name_lead","<br><b>Lead Details</b><br>name_lead",$msg);
	$msg = str_replace("id_submission_type","<br><b>Tech Details (ignore)</b><br>id_submission_type",$msg);
		
$subject = "£25 Cash Back Referral";
$mailheaders = "Content-type: text/html; charset=iso-8859-1\r\n";
$mailheaders .= "MIME-Version: 1.0\r\n";
$mailheaders .= "From: Pitch Invasion Admin \n";
$mailheaders .= "BCC: $BCC"; 
$mailheaders .= "CC: $CC"; 
mail("$mail_to_cash_back", "$subject", $msg, $mailheaders);
---------------------------------------

Many thanks in advance for any help.

Regards,

Leon Chevalier
 
Hi,

I worked out what the problem was:

Code:
"From: Pitch Invasion Admin \n"

I changed this From: line to an actual email address and things started working again.

Regards,

Leon[/code]
 
Back
Top