WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#39597 closed defect (bug) (invalid)

Authtype order in class-smtp.php

Reported by: bcmarius Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.1
Component: Mail Keywords:
Focuses: Cc:
PR Number:

Description

i had to modify line 417 in class-smtp.php so I can use authtype LOGIN
Line 417 modified foreach (array('LOGIN', 'PLAIN', 'CRAM-MD5') as $method) {

original was

foreach (array('CRAM-MD5', 'PLAIN', 'LOGIN') as $method) {

and it always wanted to authenticate CRAM-MD5 witch my server does not support

Change History (3)

#1 @SergeyBiryukov
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @bcmarius, welcome to Trac! Thanks for the ticket.

class-smtp.php is a part of PHPMailer external library, this should be reported upstream:
https://github.com/PHPMailer/PHPMailer/issues

#2 @ediware
3 years ago

Hello,

I had the same issue. The sequence 'LOGIN', 'PLAIN', 'CRAM-MD5' is the correct order, I doesn't understand why phpmailer has change it. It has caused a lots of bugs with our smtp servers.

#3 @ediware
3 years ago

The is a solution without changing anything in the core.

Juste add these lines in your functions.php

add_action('phpmailer_init','patch_smtp');

function patch_smtp($phpmailer) {
$phpmailer->AuthType='LOGIN';
}

Note: See TracTickets for help on using tickets.