Jump to content

535 5.7.8 Error: authentication failed: Invalid authentication mechanism


Hachemi

Recommended Posts

7 minutes ago, Randy Calvert said:

It’s saying something you’ve provided is wrong. It could be that you’ve chosen the wrong version of SMTP protocol or the port number is wrong. 

But this is not an IPB issue. It cannot handle authentication issues. 

Thank you for your help but no it's not something I've provided wrong, it said "Invalid authentication mechanism", as I said, my credentials are ok, because I've tried them on https://dnschecker.org/smtp-test-tool.php and the mail was sent and received without any issue.

I tried all methods (Plain Text, SSL, TLS) but still same issue.

Link to comment
Share on other sites

34 minutes ago, Marc Stridgen said:

As has already been mentioned there, you need to check this with your provider. The message there is coming from your email service

Hum ok, but how do you explain when I try the credentials on https://dnschecker.org/smtp-test-tool.php the mails are sent and received without any issue and not on my Invision forum ?

In my opinion it's an easy response to say "check this with your provider ..." without investigate why we have this message. It's not a credential issues, it's an "authentication mechanism" problem.

Link to comment
Share on other sites

19 minutes ago, Hachemi said:

Hum ok, but how do you explain when I try the credentials on https://dnschecker.org/smtp-test-tool.php the mails are sent and received without any issue and not on my Invision forum ?

This would be a question for your email host also

20 minutes ago, Hachemi said:

In my opinion it's an easy response to say "check this with your provider ..." without investigate why we have this message. It's not a credential issues, it's an "authentication mechanism" problem.

While I understand the conclusion you seem to have arrived at here, we have many thousands of people using SMTP on a daily basis on our software, and the error message itself is not being thrown by our software. The error is being returned from your email hosting provider.

Link to comment
Share on other sites

  • 1 year later...

So I found a way to fix this problem. And I think Invision shoult add something in the configuration of the SMTP.

 

I'm using the SMTP from Protonmail with SSL. For SSL and TLS Protonmail support only AUTH PLAIN (not AUTH LOGIN). But Invision use  only AUTH LOGIN and doesn't support AUTH PLAIN.

So when I configure the SMTP I see the following message:

535 5.7.8 Error: authentication failed: Invalid authentication mechanism

To fix this In the file

system/Email/Outgoing/Smtp.php

I replaced this part:

if ( $this->smtpUser )
{
    $responseCode = $this->_sendCommand( 'AUTH LOGIN', 334 );
    $responseCode = $this->_sendCommand( base64_encode( $this->smtpUser ), 334 );
    $responseCode = $this->_sendCommand( base64_encode( $this->smtpPass ), 235 );
}

With this:

if ( $this->smtpUser )
{
    $responseCode = $this->_sendCommand( 'AUTH PLAIN', 334 );
    $responseCode = $this->_sendCommand( base64_encode("\0" . $this->smtpUser . "\0" . $this->smtpPass), 235);
}

And it's working. I think Invision need to add an option in the SMTP configuration to allow user to choose between AUTH PLAN or AUTH LOGIN or automatically detect the options available.

Regards

Link to comment
Share on other sites

11 minutes ago, Lemarinel Sébastien said:

So I found a way to fix this problem. And I think Invision shoult add something in the configuration of the SMTP.

 

I'm using the SMTP from Protonmail with SSL. For SSL and TLS Protonmail support only AUTH PLAIN (not AUTH LOGIN). But Invision use  only AUTH LOGIN and doesn't support AUTH PLAIN.

So when I configure the SMTP I see the following message:

535 5.7.8 Error: authentication failed: Invalid authentication mechanism

To fix this In the file

system/Email/Outgoing/Smtp.php

I replaced this part:

if ( $this->smtpUser )
{
    $responseCode = $this->_sendCommand( 'AUTH LOGIN', 334 );
    $responseCode = $this->_sendCommand( base64_encode( $this->smtpUser ), 334 );
    $responseCode = $this->_sendCommand( base64_encode( $this->smtpPass ), 235 );
}

With this:

if ( $this->smtpUser )
{
    $responseCode = $this->_sendCommand( 'AUTH PLAIN', 334 );
    $responseCode = $this->_sendCommand( base64_encode("\0" . $this->smtpUser . "\0" . $this->smtpPass), 235);
}

And it's working. I think Invision need to add an option in the SMTP configuration to allow user to choose between AUTH PLAN or AUTH LOGIN or automatically detect the options available.

Regards

Please feel free to post his as a suggestion in our feedback area

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...