基于 smtp 方式的邮件发送
class testController extends Mb{
public function index(){
$mailer = t('mailer');
$mail_Config = ['Host'=>'smtp.exmail.qq.com','Port'=>465,'FromName'=>'发信人','Username'=>'admin@liot.cn','Password'=>'123456'];
$send_res = $mailer->send($mail_Config,['51154393@qq.com','860000220@qq.com'],'测试发信 - 邮件标题','邮件内容,验证码:12234');
if($send_res){
echo '发送成功';
}else{
echo '发送失败';
}
}
}可以赞助并支持下作者哦,谢谢!