I have used the below on an one Host and it works no problem, yet it does not work on my other host site.
Now the problem I have is when I remove the code for the copy/cc part it works fine. Does the $Copy ="Cc: $ToCopy\r\n"; not work on some versions of PHP.
Any help welcome this is driving me nuts
Thanks
LuckyBoy
?>
$ToEmail = "Rhoggan123@aol.com";
$ToCopy = "rhoggan@touchdry.com";
##$ToName = "Admin";
$ToSubject = "Email Quote Request";
$EmailBody = "PERSONEL DETAILS FIRST\n\nSent By: $Title $FirstName $Surname\nDate Of Birth: $DateOfBirth\nDo You Smoke :$DoYouSmoke\nOccupation: $Occupation\n\nPERSONEL DETAILS SECOND\n\n$Title2 $FirstName2 $Surname2\nDate Of Birth: $DateOfBirth2\nDo You Smoke :$DoYouSmoke2\nOccupation: $Occupation2\n\nAddress: \n$Address\nPost Code: $PostCode\nTelephone No: $Telephone\nEmail: $Email\n\nTYPE OF POLICY REQUIRED\n\nType Of Policy Required1: $TypeOfPolicyReq\nType Of Policy Required2: $TypeOfPolicyReq2\nIs this request in relation to a repayment mortgage: $repaymentmortgage\nIs Wavier of Premium required: $WavierofPremium\nSum Assured: $SumAssured\nAnnual Benefit: $AnnualBenefit\nPolicy Term: $PolicyTerm\nCurrent Premium: $CurrentPremium\nCurrent Policy Type: $CurrentPolicyType\nIntroducer Code: $IntroducerCode\nWhere did you hear about Rebroke: $HeardAboutFrom\n";
$EmailFooter="\nThis message was sent by: $Name";
$Message = $EmailBody.$EmailFooter;
$Copy ="Cc: $ToCopy\r\n";
mail($ToName." <".$ToEmail.">", $ToSubject, $Message, "From: ".$Name." <".$Email.">", $Copy);
echo "<br><br>";
echo "$FirstName";
echo "<br><br>";
echo "Thank you for your enquiry";
echo "<br><br>";
echo "We will now research the market based upon your requirements,";
echo " choose the lowest charging insurer and then discount the premium";
echo " by AT LEAST 10%.";
echo "<br><br>";
echo "Your quote will be dispatched within 24 hours";
?>