php发邮件Email

PHPMailer 的官方网站https://github.com/Synchro/PHPMailer/commit/9103c12ef029550961e1b69e2a5053b95a2a8246

网站建设哪家好,找成都创新互联!专注于网页设计、网站建设、微信开发、小程序开发、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了松阳免费建站欢迎大家使用!

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 ;

}

?>


文章标题:php发邮件Email
文章位置:http://hbruida.cn/article/jopehs.html