您好,登录后才能下订单哦!
PHPMailer 的官方网站https://github.com/Synchro/PHPMailer/commit/9103c12ef029550961e1b69e2a5053b95a2a8246
<?php
public function actionemail($AddAddress,$Subject,$Body,$Call){
//$AddAddress 接收者邮箱
//$Subject 邮件标题
//$Body 邮件内容
//$Call 接收者称呼
$mail = Yii::createComponent('application.extensions.mailer.EMailer');
$mail->Host = 'smtp.exmail.qq.com';
$mail->IsSMTP();
$mail->Host = 'smtp.exmail.qq.com';
$mail->SMTPAuth = true;
$mail->CharSet = 'UTF-8';
$mail->setLanguage('zh_cn');
$mail->Username = ''; //账号
$mail->Password = ''; //密码
$mail->From = ''; //账号
$mail->FromName = ''; //发送人昵称
$mail->AddAddress($AddAddress,$Call);
$mail->Subject = $Subject;
$mail->Body = $Body;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
echo $mail->Send() ? true : false ;
}
?>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。