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