htmlMimeMail5 你这个类没有用username,password登陆,
要是自己连接服务器发信的话,不应该调用mail函数的。

解决方案 »

  1.   

    这个错误是说你的SMTP不是匿名的,需要用户验证
      

  2.   

    这个htmlMimeMail5类的发送底层应该还是调用mail函数的。我上面的代码只是把自己真实的用户名和密码隐藏了,在我的程序里用的是真实的用户名和密码啊。
    setSMTPParams('smtp.163.com',25,'mail.smtp.auth',true,'username','password');当中的参数描述如下:第一个是smtpHost,第二个是port,第三个是HELO command,第四个是验证,的五个是用户名,第六个是密码。
      

  3.   

    这个表示需要验证至于具体情况 估计是你代码调用的问题那个类没有用过 你可以用PEAR 的smtp
    参考下面的代码,我发送成功的,如果你的不行就是有可能 服务器的问题   require_once "Mail.php";
       
       class Mail{
          
        static $mail_config=array(
          "host"=>"mail.xxx.com",
          "port"=>25,
          "auth"=>true,
          "username"=>"[email protected]",
          "password"=>"xxx",   
          "from"=>"[email protected]",
             );
       
          private $sender;
          /**
           * an sender's result
           */
          private $result;
          function __construct(){
            $this->sender=Mail::factory("smtp",
             self::$mail_config
            );
          }
          function process($to,$subject,$body,$user,$pass){
           $header=array(
             "Subject"=>$subject,
             "From"=>self::$mail_config["from"],
           );
           $this->result=@$this->sender->send($to,$header,$body);
           return $this->result;
          }     
       }