Problem with SMTP emails sent via PhpMailer: Helo

2019-09-15 06:31发布

问题:

The error it's giving me is:

SMTP -> FROM SERVER:

SMTP -> FROM SERVER:

SMTP -> ERROR: EHLO not accepted from server:

SMTP -> FROM SERVER:

SMTP -> ERROR: HELO not accepted from server:

SMTP -> ERROR: AUTH not accepted from server: 477 you did not wait for a prompt

SMTP -> FROM SERVER:

SMTP -> ERROR: RSET failed:

mailer error: SMTP Error: Could not connect to SMTP host.

Does anyone have an idea of what the issue might be??? Thanks for your help!

回答1:

@Cristian: I'm using Version: 2.0.4.

    $this->load->library('PhpMailer');

    $this->phpmailer->Host = "mail.xxx.org";
    $this->phpmailer->IsSMTP();
    $this->phpmailer->SMTPAuth = true;      

    $this->phpmailer->Username = 'xxx';
    $this->phpmailer->Password = 'xxxx';

    $this->phpmailer->From= 'info@xxx.org';
    $this->phpmailer->FromName = 'xxx Info';

    $this->phpmailer->AddReplyTo('info@xxx.org', 'Info');

    $this->phpmailer->Subject = 'Php mailer test';

    $this->phpmailer->Body = 'test msg body';

    $this->phpmailer->SMTPDebug = 2;

    $this->phpmailer->AddAddress('example@xxx.com', 'BlackTie');

    if(!$this->phpmailer->Send()){
        echo 'mailer error: ' . $this->phpmailer->ErrorInfo;
    }else{
        echo 'msg sent';
    } 

Here's the error message:

SMTP -> FROM SERVER:

SMTP -> FROM SERVER:

SMTP -> ERROR: EHLO not accepted from server:

SMTP -> FROM SERVER:

SMTP -> ERROR: HELO not accepted from server:

SMTP -> ERROR: AUTH not accepted from server: 477 you did not wait for a prompt

SMTP -> FROM SERVER:

SMTP -> ERROR: RSET failed: mailer error: SMTP Error: Could not connect to SMTP host.