Mailer Error: Language string failed to load

Source: Internet
Author: User
Tags character set

Mailer Error: Language string failed to load: from_failedmailangel123@163.com,

This problem suddenly occurs when I regularly send an email to a member [phpmailer]. After careful analysis, I found that the username and password are incorrect. The following is a function that can indeed send emails.

Nclude_once ("../pmail/class. phpmailer. php ");
Smtp_mail ();

Function smtp_mail (){
$ Mail = new PHPMailer ();
$ Mail-> IsSMTP (); // send via SMTP
$ Mail-> Host = "smtp.163.com"; // SMTP servers
$ Mail-> SMTPAuth = true; // turn on SMTP authentication
$ Mail-> Username = "mailangel123"; // SMTP username note: @ domain name is not required for normal mail authentication.
$ Mail-> Password = "*******"; // SMTP password
$ Mail-> From = "mailangel123@163.com"; // sender's mailbox
$ Mail-> FromName = "Hello, you haven't been here for a long time"; // sender
$ Mail-> CharSet = "GB2312"; // The character set is specified here!
$ Mail-> Encoding = "base64 ";
$ Mail-> AddAddress ("mailangel123@163.com", "test"); // recipient's mailbox and name
$ Mail-> AddReplyTo ("mailangel123@163.com", "163.com ");
$ Mail-> IsHTML (true); // send as HTML
$ Mail-> Subject = 'Hello, you haven't been here for a long time! '; // Email subject
$ Mail-> Body = "test content"; // mail content
$ Mail-> AltBody = "text/html ";
$ Mail-> Send ();
If (! $ Mail-> Send ())
{
Echo "Message cocould not be sent. <p> ";
Echo "Mailer Error:". $ mail-> ErrorInfo;
Exit;
}

Echo "Message has been sent ";
}

Change mailangel to your own email address.

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.