打開 include/payment/alipay.php 文件
找到
$this->log_result("verify_success,訂單號:".$order_sn); //將驗證結(jié)果存入文件
在此代碼下面添加如下代碼(部分代碼需要修改)
$mailbody = '';
$mailtitle = "訂單號:".$order_sn."支付成功!";
$mailbody .= "這里是提示信息";
$email='
[email protected]';//改為要接收郵件的郵箱
$cfg_sendmail_bysmtp = 'Y';
$cfg_smtp_server = 'smtp.qq.com'; //qq郵件服務器地址
$cfg_smtp_port = '25'; //端口號,默認為25
$cfg_smtp_usermail = '
[email protected]'; //發(fā)件郵箱地址
$cfg_smtp_user = 'www.moke8.com'; //名稱
$cfg_webname = '廬州生活博客園'; //站名稱
$cfg_smtp_password = 'password'; //發(fā)件郵箱密碼
$headers = "From: ".$cfg_smtp_usermail."\r\nReply-To: ".$cfg_smtp_usermail;
if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server))
{
$mailtype = 'TXT';
require_once(dirname(__FILE__)."/../mail.class.php");
$smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password);
$smtp->debug = false;
$smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
}
else
{
@mail($email, $mailtitle, $mailbody, $headers);
}