require_once("common.inc.php");
$clientname=$firstname.' '.$lastname;
$clientemail=$email;
if($email==""){
print "exit";
exit;
}
$email_head="oneworldlearning.com.hk ";
$body='
無標題文件
Contactus form - '.$email_head.'
| Firstname | '.$firstname.' |
| Lastname | '.$lastname.' |
| Company | '.$company.' |
| Email | '.$email.' |
| Area | '.$area.' |
| Mobile | '.$mobile.' |
| Age | '.$age.' |
| Message | '.nl2br($message).' |
|
';
$sendername=$clientname;
$from=$clientemail;
//require("phpunit.php");
require($INCLUDE_DIR . "class.phpmailer.php");
$mail = new PHPMailer();
$name = trim($name);
$email = trim($email);
$mail->From = trim($from);//??? address
//$mail->ReplyTo = trim($from);
$mail->AddReplyTo(trim($from), $sendername);
$mail->FromName = trim($sendername);//??? name
$mail->Sender = trim($from);
//$mail->Subject = "".trim($title); //??
//$mail->Subject = "Enquiry from ".trim($clientname);
$mail->Subject = "Contactus form - ".$email_head;
//$body=$body;
//$body = "Date: $the_date\nName: $name\nCountry: $country\nCity: $city\nEmail: $email\n\nComment:\n$comment\n\n\n-----Enquiry Basket-----\n\n$items---------------------";
$mail->Body = $body;//??html????????
$mail->isHTML(true);
clearstatcache();
$mail->AddAddress("info@oneworldlearning.com.hk");
//print $body;
//exit;
$result = $mail->Send();
print '
';
if ($result)
{
/*
$printresult = "";
*/
/* window.location='index.php';*/
$printresult = "";
}
else
{
/*$printresult = "";*/
$printresult = "";
/* history.back(); $printresult = "";
*/
}
//==================
print $printresult;
?>