您好,欢迎访问一九零五行业门户网

TP整合DEDECMS的邮件发送类

dedecms的邮件发送类非常方便,下面大象给大家扣出来了,附件上传不了php的,上代码了
/*
     * 邮件发送
     * @param string $to 收件人邮箱,多个邮箱用,分开
     * @param string $title 标题
     * @param string $content 内容
     */
public function email($to,$title,$content){
        import(@.org.util.mail);       //导入邮件类,在附件里面
                //邮件相关变量
        $cfg_smtp_server = 'smtp.qq.com';
        $cfg_ask_guestview = '8';
        $cfg_smtp_port = '25';
        $cfg_ask_guestanswer = '8';
        $cfg_smtp_usermail = '222222@qq.com';//你的qq邮箱
        $cfg_smtp_user = '222222';//你的qq号
        $cfg_smtp_password = '123456';//你的qq密码
$smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password);
        $smtp->debug = false;
$mailtitle=$title;//邮件标题
        $mailbody=$content;//邮件内容 
                //$to 多个邮箱用,分隔
        $mailtype='txt';
        $smtp->sendmail($to,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
    }
mail.class.zip ( 2.58 kb 下载:316 次 )
ad:真正免费,域名+虚机+企业邮箱=0元
其它类似信息

推荐信息