discuz论坛通过php函数sendmail发送函数解析
<?phpif(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
require_once libfile('function/mail');
$rst = sendmail('xxx@qq.com','this is subject','this is message','xxx@163.com');
if($rst) {
//注意:请检查discuz目录下面的/data/log/XXXXXX_SMTP.php里面是否有记录,有记录的话就发送不成i功,具体原因log里面有提示
echo 'send success';
}else {
echo 'send failure';
}
页:
[1]