| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 | <?$gender        = $_POST["gender"];
 $name        = $_POST["name"];
 $coname        = $_POST["coname"];
 $tel        = $_POST["tel"];
 $fax        = $_POST["fax"];
 $email        = $_POST["email"];
 $message    = $_POST["message"];
 
 $INCLUDE_DIR = "";
 $to = "";
 
 //require("phpunit.php");
 require($INCLUDE_DIR . "class.phpmailer.php");
 error_reporting(E_ALL);
 
 
 $body = '<HTML>';
 $body .= '<HEAD>';
 $body .= '<TITLE>RogerKam</TITLE>';
 $body .= '<META http-equiv=Content-Type content=text/html; charset=UTF-8>';
 $body .= '</HEAD>';
 $body .= '<body LINK=#0000ff VLINK=#800080 bgcolor=#FFFFFF leftMargin=10 topMargin=20 marginheight=0 marginwidth=0>';
 $body .= '<p style="font-family:Arial;font-size=10">';
 $body .= '<table width=579 border=0 cellpadding=0 cellspacing=0>';
 $body .= '<tr><td height="25" colspan="2" align="center" bgcolor="#CCCCCC" class="txt"><strong>  Inquiry Form</strong></td></tr>';
 $body .= '<tr><td width="145" height="25" align="right" bgcolor="#F5F5F5" class="txt">Name:  </td>';
 $body .= '<td width="434" bgcolor="#F5F5F5" class="txt">'. $gender .' '.$name.'</td></tr>';
 $body .= '<tr><td height="25" align="right" bgcolor="#F5F5F5" class="txt">Company Name:  </td>';
 $body .= '<td bgcolor="#F5F5F5" class="txt">'. $coname .'</td></tr>';
 $body .= '<tr><td height="25" align="right" bgcolor="#F5F5F5" class="txt">Tel :  </td>';
 $body .= '<td bgcolor="#F5F5F5" class="txt">'. $tel .'</td></tr>';
 $body .= '<tr><td height="25" align="right" bgcolor="#F5F5F5" class="txt">Fax:  </td>';
 $body .= '<td bgcolor="#F5F5F5" class="txt">'. $fax .'</td></tr>';
 $body .= '<tr><td height="25" align="right" bgcolor="#F5F5F5" class="txt">E-Mail:  </td>';
 $body .= '<td bgcolor="#F5F5F5" class="txt">'. $email .'</td></tr>';
 $body .= '<tr><td height="25" align="right" valign="top" bgcolor="#F5F5F5" class="txt">Enquiry:  </td>';
 $body .= '<td width="434" bgcolor="#F5F5F5" class="txt">'. $message .'</td></tr></table>';
 $body .= '</p>';
 $body .= '</BODY>';
 $body .= '</HTML>';
 
 $FromEmail=$email;
 $to="info@wah-tung.com";
 $FromName="$name";
 $subject="Online Enquiry";
 $x_mail = new PHPMailer();
 $x_mail->IsSMTP();
 $x_mail->Host = "localhost";
 $x_mail->SMTPAuth = true;
 $x_mail->charSet = "UTF-8";
 $x_mail->From = $email;
 $x_mail->FromName = $FromName;
 $x_mail->AddAddress($to,$to);
 $x_mail->WordWrap = 50;
 $x_mail->IsHTML(true);
 $x_mail->Subject = $subject;
 $x_mail->Body    = $body;
 $x_mail->Send();
 header("Location: contactus.php");
 ?>
 
 |