<?php
include("smtp.php");
//phpbb的內建的變數帶入
//指定relay的伺服器
$board_config['smtp_host']="yourrelaydomain.com.tw";
//指定帳號 :部份的relay server需要
$board_config['smtp_username']="";
//指定你的寄信密碼
$board_config['smtp_password']="";
//指定寄件人的email
$board_config['board_email']="";
//處理掉phpbb內定的訊息函數
function message_die($a,$b,$c) {}
//--------------------------------- 以下為寄信實例 ---------------------------------------//
//收件人email
$email="";
//
$subject="測試寄個信!!";
//內容
$c;
//標頭微調
$addheader .="From:".$board_config['board_email']."\r\n";
//指定信件的格式為文字格式或html格式及信件的內文編碼方式
$addheader .="Content-Type: text/plain;charset=utf8\r\n";
//
//$addheader .="Content-Type: text/html;charset=utf8\r\n";
//$addheader .="cc:".$board_config['board_email']."\r\n";
//$addheader .="bcc:".$board_config['board_email']."\r\n";
smtpmail($email,$subject,$contents,$addheader);
?>
|