Fatal error: Cannot redeclare drupal_mail_wrapper() (previously declared in /var/www/sites/all/modules/smtp/smtp.module:853) in /var/www/sites/all/modules/mailsystem/mailsystem.inc on line 20

Get this when trying to send the test email.

Changing the contents to:

if (!function_exists('drupal_mail_wrapper')) {
  function drupal_mail_wrapper(array $message) {
    $mailsystem = drupal_mail_system($message['module'], $message['key']);
    return $mailsystem->mail($message);
  }
}

Stops the error

Comments

pillarsdotnet’s picture

Status: Active » Closed (duplicate)

The change you suggest merely makes Mail System unusable.

Mail System 6.x is not compatible with SMTP Authentication Support 6.x and the SMTP maintainer will not accept my patch to make them compatible.

For all the gory details, see #1124252: The SMTP module should use or support the Mail System module

vikingew’s picture

Status: Closed (duplicate) » Closed (won't fix)

As I'm not involved in the D6 version of SMTP module I don't see it as my call to reopen this issue but I disagree with it to be a dupe of #1124252: The SMTP module should use or support the Mail System module, which I have reopened btw ;-)

I you need to look at this in the light that SMTP has been around for quite some time, so creating a new module to solve a problem that require that SMTP depends on it looks like a hard sell from start. I don't say it's wrong, and you gave it good backing by offering a patch, but it still may not be what the D6 devs of smtp want.

As for SMTP D7, I just want to stress that your patch not have been rejected, but also that it haven't been accepted, yet. As stated in the other issue, I simply don't have the time right now but I am very aware of the problem you have pointed at, so I strongly disagree with closing that issue and will assign myself to work for a solution (for smtp) when my work schedule eases up.

I like to add as well that I appreciate the work you have done, so don't be sad about it :-)