关于用phpmailer 发邮件的有关问题

WBOY
Release: 2016-06-13 10:05:34
Original
952 people have browsed it

关于用phpmailer 发邮件的问题
小弟刚接触php不久,试着想用phpmailer   发送邮件,但是得到了以下的error   message..   The   following   From   address   failed:   [email protected]    

以下是代码,本人学习php时间不长,所以水平不高,希望各位高手能多多帮忙,谢谢大家

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   =   "[email protected] ";
$mail-> AddAddress( "[email protected] ");

$mail-> Subject   =   "First   PHPMailer   Message ";
$mail-> Body   =   "Hi!   \n\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. ';
}
?>

------解决方案--------------------
error message.. The following From address failed: [email protected]

没有这个EMAIL地址嘛

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!