IsSMTP(); //設定使用SMTP方式寄信 $mail->SMTPAuth = true; //設定SMTP需要驗證 $mail->SMTPSecure = "ssl"; // Gmail的SMTP主機需要使用SSL連線 $mail->Host = "smtp.gmail.com"; //Gamil的SMTP主機 $mail->Port = 465; //Gamil的SMTP主機的SMTP埠位為465埠。 $mail->CharSet = "utf-8"; //設定郵件編碼 $mail->Username = "benicotw@gmail.com"; //設定驗證帳號 $mail->Password = "benicotw168!^*"; //設定驗證密碼 $mail->From = "service@benico.com.tw"; //設定寄件者信箱 $mail->FromName = "Benico Admin"; //設定寄件者姓名 $mail->Subject = "來自Benico的聯繫訊息!"; //設定郵件標題 $mail->Body = nl2br('訊息內容如下:
* First Name:'.$_POST['First'].'
* Last Name:'.$_POST['Last'].'
* Company:'.$_POST['Company'].'
Title:'.$_POST['Title'].'
* E-Mail:'.$_POST['E-Mail'].'
Phone Number:'.$_POST['Phone Number'].'
* Country:'.$_POST['Country'].'
Address:'.$_POST['Address'].'
City:'.$_POST['City'].'
State:'.$_POST['State'].'
Zip Code:'.$_POST['Zip'].'
Website:'.$_POST['Website'].'
Comments:'.$_POST['Comments'].'
時間:'.date("Y-m-d H:i:s").'
IP:'. $_SERVER["REMOTE_ADDR"].'
詢價清單:
' . $_POST['inqlist'].'
'); //設定郵件內容 $mail->IsHTML(true); //設定郵件內容為HTML //迴圈 for($i=0;$i<=$count_mb;$i++){ $mail->AddAddress($mb_array[$i]); //設定收件者郵件及名稱 } if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } //刪除詢價單session unset($_SESSION['inq_session']); //setcookie("inq_session", "", time()-3600); $url = "index.php"; echo ""; exit; } ?> ::
0) AND isset($_SESSION['inq_session'])){?>

 

Please fill out the following information correctly.

Your information will assist us in providing the prompt and accurate service.
All fields marked with an asterisk (*) are required. Thank you for your cooperation.

Inquiry List:
( ) View Product Delete
">
* First Name : Required Information
* Last Name : Required Information
* Company : Required Information
Title :
* E-Mail : Required InformationIncorrect format
Phone Number : Incorrect format。
* Country : Required Information
Address :
City : Can not be blank
State :
Zip Code :
Website :
Comments :