Questions about using phpmailer to send emails

Source: Internet
Author: User
Concerning the problem of sending emails with phpmailer, the younger brother tried to use phpmailer & nbsp; to send emails shortly after he got in touch with php, but got the following error & nbsp; message .. & nbsp; The & nbsp; following & nbsp; From & nbsp; address & nbsp; failed: & n questions about sending emails with phpmailer
The younger brother just got in touch with php and tried to use phpmailer to send an email, but got The following error message .. The following From address failed: example@163.com

The following is the code. I have not learned php for a long time, so the level is not high. I hope you can help me a lot. thank you!
Require ("class. phpmailer. php ");
$ Mail = new PHPMailer ();
$ Mail-> IsSMTP (); // telling the class to use SMTP
$ Mail-> Host = "smtp.163.com"; // SMTP server
$ Mail-> SetLanguage ("en", "./phpmailer/language /");
$ Mail-> From = "example@163.com ";
$ Mail-> AddAddress ("123123123@hotmail.com ");

$ Mail-> Subject = "First PHPMailer Message ";
$ Mail-> Body = "Hi! \ N This is my first e-mail sent through PHPMailer .";
$ Mail-> WordWrap = 50;

If (! $ Mail-> Send ())
{
Echo 'message was not sent .';
Echo 'mailer error: '. $ mail-> ErrorInfo;
}
Else
{
Echo 'Message has been sent .';
}
?>

------ Solution --------------------
Error message.. The following From address failed: example@163.com

I don't have this 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.