Closed (duplicate)
Project:
SMTP Authentication Support
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Sep 2010 at 23:03 UTC
Updated:
27 Oct 2010 at 21:08 UTC
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 commented--- IGNORE -- Pasted wrong function.
Comment #2
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 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.