[Sun Nov 19 01:49:07 2006] [error] [client 192.168.42.xxx] PHP Fatal error: Cannot redeclare user_mail_wrapper() (previously declared in /srv/www/vhosts/mypath/htdocs/modules/returnpath/returnpath.module:22) in /srv/www/vhosts/mypath/htdocs/modules/smtp/smtp.module on line 197

Comments

budda’s picture

Status: Active » Closed (works as designed)

Don't install both modules together. They both need the same Drupal function to work.

greggles’s picture

Version: 4.7.x-1.x-dev » 5.x-1.1
Category: bug » feature
Status: Closed (works as designed) » Active

I ran into the same problem with the mimemail module.

I know that it's "not returnpath's fault" but it would be nice if rather than a fatal error the module would do a check if the function_exists('user_mail_wrapper') before declaring it and if it exists, just do a drupal_set_message warning about the incompatibility. http://php.net/function_exists

Tentatively setting back to active as a feature request in light of this new proposal, but feel free to won't fix again if you feel this is unecessary.

not_Dries_Buytaert’s picture

Title: Module interferes with smtp.module » Incompatible with smtp.module (redeclared function)
Version: 5.x-1.1 » 6.x-1.0
Category: feature » bug

Getting this error message after enabling returnpath.module (Return-Path), while smtp.module (SMTP Authentication Support) is enabled:
Fatal error: Cannot redeclare drupal_mail_wrapper() (previously declared in {path}/modules/smtp/smtp.module:236) in {path}/modules/returnpath/returnpath.module on line 52
using:
returnpath-6.x-1.0.tar.gz
smtp-6.x-1.0-beta3.tar.gz
PHPMailer_v5.0.0.tar.gz

I have also submitted this issue for the SMTP Authentication Support module:
http://drupal.org/node/597986

not_Dries_Buytaert’s picture

It turns out (http://drupal.org/node/597986) that the SMTP Authentication Support module DOES correctly handle the return path email headers. Therefore, activation of the returnpath.module (Return-Path) should be disabled/ disallowed, whenever the 'SMTP Authentication Support' module is activated.

budda’s picture

How do you disallow/disable a module if another module is active?

darrenj1’s picture

Hi, I am getting this error when trying to uninstall the module, how can I get it to uninstall successfully?

budda’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Assigned: Unassigned » budda

I've added the function_exists check as per #973730: Cannot redeclare drupal_mail_wrapper()

Adding a message saying return-path is disabled due to another module still to be done.

avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, as it has been created for a version that isn't supported anymore and the project doesn't have versions for any supported Drupal version (actually Drupal 7, Drupal 8, and Drupal 9).