Phpmailer Show message sent successfully but not received? Who knows why?
The class is I download online! Then you fill out the display has been sent successfully but the mailbox but not receive mail!
Require ("class.phpmailer.php");
$mail = new Phpmailer (); Set up a mail sending class
$address = $_post[' address '];
$mail->issmtp (); Send using SMTP mode
$mail->charset = "UTF-8"; Chinese;
$mail->host = "smtp.qq.com"; Office SMTP Server
$mail->smtpauth = true; Enable the SMTP authentication feature
$mail->username = "1017113114"; User name (please fill in the full email address)
$mail->password = "******"; Password
$mail->from = "[email protected]"; Email Sender Email Address
$mail->fromname = "yyyyyy";
$mail->addaddress ("[Email protected]", "tttt");//Recipient address
$mail->addattachment ("/var/tmp/file.tar.gz"); Add an attachment
$mail->ishtml (TRUE); Set email format to HTML//whether HTML is used
$mail->subject = "phpmailer test mail"; Message header
$mail->body = "Hello, this is test mail, Baidu"; Message content
$mail->altbody = "From Mars"; Additional information, you can omit
$mail->smtpdebug;
if (! $mail->send ())
{
echo "message failed to send.
";
echo "Error Reason:". $mail->errorinfo;
Exit
}
echo "Mail sent successfully";
?>
------Solution--------------------
This only knows when the debug message is out.
------Solution--------------------
$mail->smtpdebug=true; Open this line.