织梦会员使用支付宝支付成功后接收邮件通知教程,具体步骤如下:
打开 include/payment/alipay.php 文件
找到
$this->log_result("verify_success,订单号:".$order_sn); //将验证结果存入文件
在此代码下面添加如下代码(部分代码需要修改)
$mailbody = ''; $mailtitle = "订单号:".$order_sn."支付成功!"; $mailbody .= "这里是提示信息"; $email='1334192673@qq.com';//改为要接收邮件的邮箱 $cfg_sendmail_bysmtp = 'Y'; $cfg_smtp_server = 'smtp.qq.com'; //qq邮件服务器地址 $cfg_smtp_port = '25'; //端口号,默认为25 $cfg_smtp_usermail = '1334192673@qq.com'; //发件邮箱地址 $cfg_smtp_user = 'www. lol9.cn'; //名称 $cfg_webname = 'HTML建站博客'; //站名称 $cfg_smtp_password = 'password'; //发件邮箱密码 $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); }
本站部分文章搜集整理于互联网或者网友提供,如有侵权请联系站长
如若转载,请注明出处:https://htmlbk.com/dedecms/160.html
温馨提示:该文档最后一次修改时间为2019-05-29 20:18:00,请注意相关的内容是否还可用!