使用phpmailer smtp发送QQ邮箱邮件
作者:vergil 发布时间:March 12, 2015 分类:php
今天在使用phpmailer smtp发送QQ邮箱的邮件时遇到些问题,在此记录一下:
QQ的发送邮件服务器:smtp.qq.com,使用SSL,端口号465或587
而且需要使用独立密码
代码如下:
$mailer = PHPMailer();
$mailer->IsSMTP();
$mailer->SMTPAuth = true;
$mailer->SMTPSecure = 'ssl';
$mailer->Password = 'QQ邮箱独立密码';
//...其他配置省略
Here is a superb Blog You may Find Exciting that we encourage you to visit.
We came across a cool website that you just could get pleasure from. Take a look in case you want.
Wonderful story, reckoned we could combine a number of unrelated information, nevertheless trul[...]
Usually posts some incredibly interesting stuff like this. If you are new to this site.
You are my inhalation, I have few web logs and rarely run out from post
Ive learn some excellent stuff here. Certainly worth bookmarking for revisiting. I wonder how a lot attempt you set to create such a fantastic informative web site.
Someone essentially help to make seriously posts I would state. This is the very first time I frequented your web page and thus far? I surprised with the research you made to make this particular publish incredible. Magnificent job!
Thanks for the sensible critique. Me & my neighbor were just preparing to do a little research about this. We got a grab a book from our area library but I think I learned more clear from this post. I am very glad to see such wonderful info being shared freely out there.
I feel like Im regularly seeking interesting features you just read about a number of subjects, but I handle to add in the blog among our translates every day when you
I usually do not drop a comment, but I read a few
I usually do not drop a comment, but I read a few
Article Source a viral game app is not that much difficult.
I genuinely enjoy studying on this website, it holds good content. Never fight an inanimate object. by P. J. O'Rourke.
Hello!
Hello!
Aw, this was a very nice post. In thought I want to put in writing like this moreover taking time and actual effort to make an excellent article but what can I say I procrastinate alot and not at all seem to get something done. kacbfedddddddeea
能否给出你的配置代码,我也是PHPMailer, sll,465,username=909235815,密码2个都试过,都不行。
$Mail = new PHPMailer();
$Mail->IsSMTP(); // Use SMTP
$Mail->Host =“smtp.qq.com”; // Sets SMTP server
$Mail->SMTPDebug = 2; // 2 to enable SMTP debug information
$Mail->SMTPAuth = TRUE; // enable SMTP authentication
$Mail->SMTPSecure = "ssl"; //Secure conection
$Mail->Port = $portnumber; // set the SMTP port
$Mail->Username = "909235815"; // SMTP account username
$Mail->Password = "独立密码"; // SMTP account password
$Mail->Priority = 1; // Highest priority - Email priority (1 = High, 3 = Normal, 5 = low)
$Mail->CharSet = 'UTF-8';
$Mail->Encoding = '8bit';
$Mail->Subject = 'Test Email Using Gmail';
$Mail->ContentType = 'text/html; charset=utf-8\r\n';
$Mail->From = $mymail;
$Mail->FromName = 'GMail Test';
$Mail->WordWrap = 50; // RFC 2822 Compliant for Max 998 characters per line
$Mail->AddAddress( "909235815@qq.com"); // To:
$Mail->isHTML( TRUE );
$Mail->Body = $mailbody;
$Mail->AltBody = $mailbody;
$Mail->Send();
$mymail="mail body";
$mailbody="this is the body of an email"