Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#39597 closed defect (bug) (invalid)

Authtype order in class-smtp.php

Reported by: bcmarius's profile bcmarius Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.1
Component: Mail Keywords:
Focuses: Cc:

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
8 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
8 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
8 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.