我可以';不要使用PHPMailer发送电子邮件


i can't send E-mail with PHPMailer

这是我第一次参加这个论坛,我希望你能帮助我。。。!

问题是我不能用PHPmailer 发送电子邮件

代码:

class Controller_Mail extends Controller_Template{
protected $oMailer;
public function __construct()
{
    $this->oMailer = new PHPMailer(true);
}
//Envoyer Password Oublie à un candidat  
public function EnvoyerPasswordOublie(Class_Candidat $objCandidat){
    try {
        $nom                 = $objCandidat->getNomPrenom() ;
        $password            = $objCandidat->getPassword() ;
        //$toMailCandidat      = $objCandidat->getMail() ;
        $toMailCandidat      = "amaljob@gmail.com" ;
        $subject             = "Mot de passe oublié !" ;    
        $message             = "Cher (e) <b>".html($nom)."</b>,<br/> <br/> 
                                Suite à votre demande, veuillez trouver ci-dessous votre identifiant et votre mot de passe, vous permettant d'accéder à votre espace :<br/><br/>
                                Email : ".html($toMailCandidat)."<br/>
                                Mot de passe : ".$password."<br/><br/>
                                Cordialement,,<br/><br/>
                                L’Equipe ".ABREV ;
        //$message             = templateStringCandidat($message) ;
        $message             = "message" ;
        $this->oMailer->IsSMTP();
        $this->oMailer->SMTPAuth   = true;
        $this->oMailer->SMTPDebug  = 2;
        $this->oMailer->Port       = 485;
        $this->oMailer->FromName   = ABREV;
        $this->oMailer->From       = MailsFrom;
        $this->oMailer->AddAddress($toMailCandidat);
        $this->oMailer->AddAddress(MailNotifications);
        $this->oMailer->AddReplyTo(MailsFrom,ABREV);
        $this->oMailer->Subject    = $subject;
        $this->oMailer->MsgHTML($message);
        $this->oMailer->IsHTML(true); // send as HTML 


        if(!$this->oMailer->Send()) {
            return 'erreur : '.$this->oMailer->ErrorInfo;
        } else {
            return true;
        }
    } catch (phpmailerException $e) {
        return false;
    }   
}

}

结果是错误

注意:我已经在PHPMailer类中配置了SMTP身份验证

作为参考,我的网站是DEMO,我把它放在一个子目录(www.domain.com/subdirectory)

尝试使用$this->oMailer->SMTPDebug = SMTP::DEBUG_LOWLEVEL; //SMTP::DEBUG_LOWLEVEL=4

该值输出更多关于可能的错误的信息