这个类的使用主要在common模块的function.php中实现,实现方式如下
Vendor("SmtpMailer");
$mail=new \SmtpMailer();
$res=$mail->send($sendname,$receivename,$email,$ti
if($res['status']==1){
//说明发送成功!
}else{
//说明发送失败!
}
以上看出我将PHPMailer文件夹放在了vendor目录下,并且在Vendor根目录建立了一个叫SmtpMailer.php的文件,然后通过上面的代码引入并发送文件。
当然其中还有个config.php文件,也是把其中的配置放到common模块的config.php中