I've just upgraded to the current version (of April 11, 2013). After that the site stopped working with blank white screen. In the log there is an error:

PHP Fatal error: Call to undefined method PHPMailer::__destruct() in /path_to_site/sites/all/modules/phpmailer/includes/phpmailer.class.inc on line 162

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

igormagic’s picture

Status: Active » Closed (works as designed)

Didn't notice the requirement to upgrade the library, sorry

sun’s picture

Glad you figured it out.

Please make sure to report positive/negative test confirmations in #1291750: PHPMailer 5.2.5 (new project home + download page + releases) — I'm considering to finally get a stable 3.0 out. ;)

justdave’s picture

Status: Closed (works as designed) » Active
FileSize
1.38 KB
8.05 KB
28.9 KB

This is still a bug (not a works as designed). Because:

The PHPMailer module adds a function to the "Status Report" page in Drupal which erroneously reports that everything is still okay when you have an outdated library.

Fixing this bug means making that status report function return an error if the installed version is too old.

Patch attached.

justdave’s picture

Status: Active » Needs review
brunorios1’s picture

using phpmailer library 5.2.7

Warning: require(PHPMailerAutoload.php): failed to open stream: No such file or directory em PHPMailer::__construct() (linha 575 de /home/brunorios/www/cmc.dev/sites/all/libraries/phpmailer/class.phpmailer.php).

brunorios1’s picture

Issue summary: View changes

corrected spelling

Anjaro’s picture

Hi, i get this error to "Call to undefined method PHPMailer::__destruct()"

I installed the 5.1 lib and phpmailer fresh install, no upgrade.

When i read this thread, i dont understand what the solution is, because my english is not that good.

Can someone explain what the solution was, thanks.

Thanks
Anjaro

alexweber’s picture

@Anjaro

Requirements: PHPMailer library, version 5.2.5+

justdave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
turbogeek’s picture

I was getting the same error as #5 with PHPMailer lib 5.27. Using 5.25 fixed the issue/error.

sun’s picture

Status: Reviewed & tested by the community » Fixed

  • Commit 96f7aa7 on 7.x-3.x authored by justdave, committed by sun:
    - #1967364 by justdave: Call to undefined method PHPMailer::__destruct...
sun’s picture

justdave’s picture

huh... I'm still running that patch and it says mine is up-to-date. weird.

Status: Fixed » Closed (fixed)

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

leymannx’s picture

I wonder where you get these versions cited in this thread here from. But maybe things got renamed. Looking at https://github.com/PHPMailer/PHPMailer/releases 5.2.26 currently seems to be the latest (and currently last) release in the 5.2 series: https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.26.