Why do I run after the total hint smtp:could not authenticate, I do not know where to modify?

Source: Internet
Author: User
1, liuyan.php as follows:
Include ("class.phpmailer.php");
Include ("class.smtp.php");

Just fill in the information and you can ****************************

$SMTP = "smtp.163.com";//required, set SMTP server QQ mailbox is smtp.qq.com, QQ mailbox default is not open, please set up in the mailbox open. NetEase is smtp.163.com or smtp.126.com.
$youremail = ' 123@163.com '; Required, open the SMTP service mailbox, that is, sender email.
$password = "123456"; Required, the password for the above mailbox

$ymail = "su.li1001@163.com"; The email address of the addressee, which is the e-mail you receive.
$yname = "Jaguar Technology"; Recipient Salutation

Fill in the information end ****************************

function Get_ip () {
if (getenv ("Http_client_ip") && strcasecmp (getenv ("Http_client_ip"), "Unknown")
$ip = getenv ("Http_client_ip");
else if (getenv ("Http_x_forwarded_for") && strcasecmp (getenv ("Http_x_forwarded_for"), "Unknown")
$ip = getenv ("Http_x_forwarded_for");
else if (getenv ("REMOTE_ADDR") && strcasecmp (getenv ("REMOTE_ADDR"), "Unknown")
$ip = getenv ("REMOTE_ADDR");
else if (isset ($_server[' remote_addr ')) && $_server[' remote_addr '] && strcasecmp ($_server[' Remote_ ADDR '], "unknown"))
$ip = $_server[' remote_addr ');
Else
$ip = "Unknown";
return ($IP);
}

$mail = new Phpmailer ();

$mail->issmtp ();
$mail->smtpauth = true;
$mail->host = $SMTP;


$mail->username = $youremail;
$mail->password = $password; Required, the password for the above mailbox

$mail->from = $youremail;
$mail->fromname = "Feedback system";

$mail->addaddress ($ymail, $yname);

if ($_post[' yourname ']) {
$yourname = $_post[' yourname ');
$tel = $_post[' Tel '];
$QQ = $_post[' QQ '];
$email = $_post[' email '];

$message = $_post[' message '];

$ip = Get_ip ();

$mail->subject = $yourname. " -"Message Feedback";


$html = ' name: '. $yourname. '
Phone: '. $tel. '
QQ: '. $qq. '
Email: '. $email. '
IP: '. $ip. '
Content: '. $sm;

$mail->msghtml ($html);

$mail->ishtml (TRUE);

if (! $mail->send ()) {
Echo ';
} else {

Echo ';
}
}
?>




<title>Feedback-by huoduan.com</title>










Message Feedback



<< Back Home



Please fill in the following content







by Jaguar Technology







Reply to discussion (solution)

You did not pass the certification:
1: Confirm that your $youremail/$password is correct
2: Confirm that your mailbox has opened the POP3/SMTP service function, see if you receive a Setup wizard mail in your mailbox

Simplify and annotate all functions and styles
Send an ABC to another mailbox first.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.