Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 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:


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
7 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:

#2 @ediware
7 years ago


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
7 years ago

The is a solution without changing anything in the core.

Juste add these lines in your functions.php


function patch_smtp($phpmailer) {

Note: See TracTickets for help on using tickets.