Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Which if it is, this error is thrown:
Fatal error: Cannot redeclare class phpmailerException in /home/path/to/website/sites/all/modules/smtp/phpmailer/class.phpmailer.php on line 2319
To fix this, just change around line 266 to look like the following:
// Include the PHPMailer class (which includes the SMTP class).
if (!class_exists('PHPMailer')) {
require_once(drupal_get_path('module', 'smtp') .'/phpmailer/class.phpmailer.php');
}
Comments
Comment #1
kyle_mathews CreditAttribution: kyle_mathews commented--- IGNORE -- Pasted wrong function.
Comment #2
kyle_mathews CreditAttribution: kyle_mathews commentedI'd also suggest adding a phpmailer_load function which can check in the libraries directory as well as in a subdirectory. This is a function I wrote for OG Mailinglist, borrowed mostly untouched from messaging_phpmailer.
Comment #3
Simon Georges CreditAttribution: Simon Georges commentedI think it's a duplicate of #541942: Move PHPMailer out of the module folder, check for class already defined. As there is a patch on that issue, I'm closing this one.