Can anyone please help me as i am receiving the email from the email address is "linxinquiry@linxinternational.org" but i want that the from email address should be the one who is filling the webform, second in the email i am getting <b> <br> tags with the values. though i have mentioned mime.php in the php code.
Please help me
<?php
require_once "Mail.php";
require_once "Mail/mime.php";
include ('Net/SMTP.php');
/* Subject and Email variables */
$to = "linxinquiry@linxinternational.org";
$emailSubject = 'Online Inquiry Form';
//smtp variables
$host = "ssl://smtp.gmail.com";
$port = "465";
$username = "linxinquiry@linxinternational.org";
$password = "xxxxxxxxxx";
/* Gathering Data Variables */
$enquiryField = $_POST['enquiry'];
$nameField = $_POST['name'];
$dobField = $_POST['dob'];
$phoneField = $_POST['phone'];
$mobileField = $_POST['mobile'];
$emailField = $_POST['email'];
$cityField = $_POST['city'];
$body = <<<EOD
<b> Online Inquiry Form </b><br>
Enquiry For: $enquiryField <br>
Name: $nameField <br>
Date of Birth: $dobField <br>
Phone No: $phoneField <br>
Mobile No: $mobileField <br>
Email ID: $emailField <br>
City: $cityField <br>
EOD;
//create and send
$headers .= "Content-type: text/html\r\n";
$headers = array ('From' => $emailField,'To' => $to,'Subject' => "$emailSubject");
$param = array ('host' => $host,'port' => $port,'auth' => true,
'username' => $username,'password' => $password, 'timeout' => 10000);
$smtp = Mail::factory('smtp', $param);
$mail = $smtp->send($to,$headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>$theResults</p>");
}
?>