Right now email is being sent but email received shows the
html codes
in body of email, andthank you
page does not launch (says "header cannot be modified...
).
I would like client to receive an html email correctly AND show client a thank_you.php
page I have already created.
Could you please help with corrections?
<?php
if($_POST["submit"])
{
$webmaster="info@limousinesworld.com";
$subject="Limousines Quote Request";
$subject_client="Thank you for your Request";
$ip = $_SERVER['REMOTE_ADDR'];
$ip2 = $_SERVER["HTTP_X_FORWARDED_FOR"];
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else ;
$headers = 'From: LimousinesWorld' . "\r\n" .
'Reply-To: info@limousinesworld.com' . "\r\n" .
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers = 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 'X-
Mailer: PHP/';
$headers = "From: LimousinesWorld <info@limousinesworld.com>";
$replyemail="info@limousinesworld.com";
$senderClient=$_REQUEST['EMail'];
$Comments1 = $_REQUEST['Comments1'] ;
$Comments2 = $_REQUEST['Comments2'] ;
$Name = $_REQUEST['Name'] ;
$Company = $_REQUEST['Company'] ;
$Telephone = $_REQUEST['Telephone'] ;
$EMail = $_REQUEST['EMail'] ;
$When_need_limo = $_REQUEST ['When_need_limo'] ;
$Country = $_REQUEST['Country'] ;
$mailBody= "
Comments1: $Comments1 \n
Comments2: $Comments2 \n
Name: $Name \n
Company: $Company \n
Country: $Country \n
Telephone: $Telephone \n
EMail: $EMail \n
When_need_limo: $When_need_limo \n";
$mailBody_client= '
<html>
<body>
<h1><strong><span style="font-size:16px;"><span style="font-
family:arial,helvetica,sans-serif;">Thank you for your Limousine Quote
Request on our website.</span></span></strong></h1>
<p><span style="font-size:16px;"><span style="font-
family:arial,helvetica,sans-serif;"><strong>We will get back to you with
very soon with: Prices, Pictures, Equipment and Options.</strong>
</span></span></p>
<p><span style="font-family:arial,helvetica,sans-serif;"><span style="font-
size:16px;"><strong>Best regards,</strong></span></span></p>
<p><span style="font-family:arial,helvetica,sans-serif;"><span style="font-
size:16px;"><strong>LimousinesWorld</strong></span></span></p>
</body>
</html>
';
mail($webmaster, $subject, $mailBody, $headers, $ip);
mail($senderClient, $subject_client, $mailBody_client, $headers);
header("Location: http://limousinesworld.com/thank_you.php");
exit;
}
?>