I noticed that I lost email whenever my first smtp server is down.
The second (backup) smtp server is never contacted nor taken into consideration.

Digging in the problem I found that the bundled phpmailer (modified from 5.1 version) in SmtpConnect() loops through the servers but exits the loops (raising an exception) as soon as it fails the first server.

So it simply ignores multiple servers.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bago’s picture

A firtst attempt at fixing the issue and start using the backup server when the first server is not available.

bago’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: smtp-phpmailer-backup-host-2226483.patch, failed testing.

bago’s picture

Another attempt formatting the patch

bago’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: smtp-phpmailer-backup-host-2226483-4.patch, failed testing.

DamienMcKenna’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs work » Needs review
FileSize
1.31 KB

Rerolled.

Status: Needs review » Needs work

The last submitted patch, 7: smtp-n2226483-7.patch, failed testing.

DamienMcKenna’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: smtp-n2226483-7.patch, failed testing.

DamienMcKenna’s picture

Status: Needs work » Needs review

The tests pass, so marking this "needs review".

Anonymous’s picture

Retesting.

Anonymous’s picture

Looks like it passed a couple times now. I put in que once more for good measure.

Anonymous’s picture

Worked perfect for me. Terminal image included.

DamienMcKenna’s picture

I've tidied up the code a little to match the Drupal coding standards.

wundo’s picture

  • wundo committed 7026c6e on 7.x-1.x authored by DamienMcKenna
    Issue #2226483 by bago, DamienMcKenna, alex_drupal_dev, wundo: Backup...
wundo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.