$name=$_GET['account_eng_name']; $email=$_GET['email']; $ID=$_GET['futures_no']; $pw=$_GET['password']; echo $name; echo $email; echo $ID; echo $pw; //////////////////////////////////////////////////////////Send Mail///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //指定收件者 $to = $email; //指定寄件者 $from = "cs@fpigp.com"; //指定郵件主旨 $subject = "=?utf-8?B?" . base64_encode("Email for ID and Password") . "?="; //指定郵件內容 $message = "
多謝閣下選用富泰中順證券期貨之服務。
特此來函通知閣下之富泰中順證券期貨–貴金屬帳戶已經獲批,以下為閣下的交易帳戶資料:
交易帳戶資料
| 帳戶類別 | 貴金屬帳戶 |
| 帳戶名稱 | $name |
ID: $ID
Password: $pw
"; //建立 MIME 邊界字串 $mime_boundary = md5(uniqid(mt_rand(), TRUE)); //開啟指定的檔案 $fp = fopen($big5_file_name, "rb"); //讀取檔案內容 $data = fread($fp, filesize($big5_file_name)); //使用 MIME base64 來對 $data 編碼 $data = chunk_split(base64_encode($data)); //建立郵件標頭資訊 $header = "From: $from\r\n"; $header.= "To: $to\r\n"; $header.= "MIME-Version: 1.0\r\n"; $header.= "Content-Type: multipart/mixed; boundary=$mime_boundary\r\n"; //建立郵件內容 $content = "This is a multi-part message in MIME format.\r\n"; $content .= "--$mime_boundary\r\n"; $content .= "Content-Type: text/html; charset=utf-8\r\n"; $content .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $content .= "$message\r\n"; //傳送郵件 mail($to, $subject, $content, $header); //////////////////////////////////////////////////////////Send Mail///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>