最近2018中文字幕在日韩欧美国产成人片_国产日韩精品一区二区在线_在线观看成年美女黄网色视频_国产精品一区三区五区_国产精彩刺激乱对白_看黄色黄大色黄片免费_人人超碰自拍cao_国产高清av在线_亚洲精品电影av_日韩美女尤物视频网站

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
怎么在php5.5中使用PHPMailer-5.2發(fā)送郵件-創(chuàng)新互聯(lián)

這篇文章給大家介紹怎么在php5.5中使用PHPMailer-5.2發(fā)送郵件,內(nèi)容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。

創(chuàng)新互聯(lián)專注于黃山區(qū)網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供黃山區(qū)營銷型網(wǎng)站建設(shè),黃山區(qū)網(wǎng)站制作、黃山區(qū)網(wǎng)頁設(shè)計、黃山區(qū)網(wǎng)站官網(wǎng)定制、微信小程序服務(wù),打造黃山區(qū)網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供黃山區(qū)網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
SMTPDebug = 3;        // Enable verbose debug output

$mail->isSMTP();          // Set mailer to use SMTP
$mail->Host = 'smtp.exmail.qq.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true;        // Enable SMTP authentication
$mail->Username = '[email protected]';     // SMTP username
$mail->Password = 'yourpassword';       // SMTP password
$mail->SMTPSecure = 'ssl';       // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465;         // TCP port to connect to

$mail->setFrom('[email protected]', 'Mailer');
$mail->addAddress('[email protected]', 'Ryan Miao');  // Add a recipient
$mail->addAddress('[email protected]');    // Name is optional
// $mail->addReplyTo('[email protected]', 'Information');
$mail->addCC('[email protected]');
$mail->addBCC('[email protected]');

$mail->addAttachment('/var/tmp/file.tar.gz');   // Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true);         // Set email format to HTML

$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body in bold!';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

if(!$mail->send()) {
 echo 'Message could not be sent.';
 echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
 echo 'Message has been sent';
}

開啟SMTPDebug可以查看日志

 `0` No output
 `1` Commands
 `2` Data and commands
 `3` As 2 plus connection status
 `4` Low-level data output


錯誤信息保存在$mail->ErrorInfo對象中。

保存為mail.php, 命令行執(zhí)行

php mail.php

關(guān)于怎么在php5.5中使用PHPMailer-5.2發(fā)送郵件就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。


網(wǎng)頁名稱:怎么在php5.5中使用PHPMailer-5.2發(fā)送郵件-創(chuàng)新互聯(lián)
標(biāo)題網(wǎng)址:http://fisionsoft.com.cn/article/dsdodi.html