Help for Phpmailer class applications
Require ("class.phpmailer.php");
function SendEmail ($from = [email protected] ', $who = ' michaelssss ', $To = [email protected] ', $body = ' BBB ')
{
$mail = new Phpmailer;
$mail->host = "smtp.163.com";
$mail->port = 25;
$mail->smtpauth = true;
$mail->smtpdebug = 1;
$mail->username = [email protected] ';
$mail->password = ' xxxxxxx ';
$mail->from = $from;
$mail->fromname = $who;
$mail->addaddress ($To, $who);
$mail->wordwrap = 50;
$mail->ishtml (TRUE);
$mail->subject = ' TEST ';
$mail->body = $body;
if (! $mail->send ())
{
Echo $mail->errorinfo;
Exit
}
Else
Echo ' Ok ';
}
SendEmail ();
?>
--I don't know which prawn can tell me why I can't send it out ... No local error ... But the test mailbox just didn't get ... The tears ran ...
------Solution--------------------
Is it junk mail?
Error_reporting (E_all); At the beginning, add this sentence.
------Solution--------------------
In $mail->host = ""; add a sentence $mail->issmtp ();