I want to send image in mail.How to add image so that it will show in the email I want to add image to the CLIENT MESSAGE BODY. How to use html in client message body?
Here is my code :
<?php
/* subject and email varialbles*/
$emailSbuject = 'Enquiry';
$webMaster = '[email protected]';
$emailSbuject2 = 'Thank you';
$client = ' $emailFeild
';
/*gathering data variables*/
$nameFeild = $_POST['name'];
$cityFeild = $_POST['city'];
$countryFeild = $_POST['country'];
$emailFeild = $_POST['email'];
$phoneFeild = $_POST['phone'];
$otherFeild = $_POST['other'];
$questionFeild = $_POST['question'];
$commentFeild = $_POST['comment'];
$phone1Feild = $_POST['phone1'];
$hear1Feild = $_POST['hear1'];
$hear2Feild = $_POST['hear2'];
$hear3Feild = $_POST['hear3'];
$hear4Feild = $_POST['hear4'];
$referralFeild = $_POST['referral'];
$otherhearFeild = $_POST['otherhear'];
// admin message body
$body= <<<EOD
Contact Form Details of $nameFeild
Name: $nameFeild
City: $cityFeild
Country: $countryFeild
Email: $emailFeild
Contact Phone: $phoneFeild
Other Phone: $otherFeild
Question: $questionFeild
Comment: $commentFeild
Contact Over: $phone1Feild
Known Us through:
$hear1Feild
$hear2Feild
$hear3Feild
$hear4Feild
$referralFeild
$otherhearFeild
EOD;
// Client message body
$body2 = <<<EOD
Dear $nameFeild
Thank u for contacting IntaxFin. One of our representatives will contact you the soonest. If you have more questions or information needed, please let us know. We are happy to serve you!
-From
IntaxFin Team
http://www.intaxfin.com
Like us on Facebook
Follow us on Twitter
Connect with us on LinkedIn
------------------------------------------------------------------------------------------------- e-mail was automatically sent by IntaxFin Administration Directory and is for your reference. Please do not reply to this e-mail address.
Powered by HexCode Technologies Pvt. Ltd.
EOD;
$headers = "From: $emailFeild
";
$header = "From: [email protected]
";
$success = mail($webMaster,$emailSbuject,$body,$headers);
$success1 = @mail($emailFeild,$emailSbuject2,$body2,$header);
/*Result*/
$theResults = <<<EOD
EOD;
echo "$theResults";
header("Location: http://www.intaxfin.com/thankyou.html");
exit;
?>
See Question&Answers more detail:os