So I've got a script which sends email, it works on one domain on my VPS but not on another which is very confusing! I've checked all the smtp details...etc. and can't see any reason for it. The script runs as though it is successful and throws up no errors and the variables are all in place.
If anyone has any ideas would be hugely appreciated!
<?php
$email=$_POST['email'];
$name=$_POST['name'];
$business=$_POST['business'];
$town=$_POST['town'];
$phone=$_POST['phone'];
$rpo=str_replace("rpo", "RPO",$_POST['rpo']);
$retained=str_replace("retained", "Retained",$_POST['retained']);
$ats=str_replace("ats", "ATS",$_POST['ats']);
$interest=$rpo . ' ' . $retained . ' ' . $ats;
$interest=str_replace('','<br>',$interest);
$msg = "You've received a new enquiry from $name at $business<br>
They are based in $town and interested in:<br>
$interest<br>
You can contact them on:<br>
<b>Phone: </b>$phone<br>
<b>Email: </b>$email<br>
This is an automatically generated email from the company website generated from http://example.com";
$msg = wordwrap($msg,70);
mail('example@example.com','New Enquiry',$msg);
header("location:http://example.com");
?>