As many others, I'd like to have several mail sending/formatting modules at the same time. For me it's mimemail, maillog and smpt. Currently this is not possible using the mail_sytem variable. As far as I understand this problem is not solved by using the http://drupal.org/project/mailsystem module.

For this reason I've written a new module called mailwire (http://drupal.org/sandbox/pluess/1179376). It provides two hooks hook_mailwire_sender() and hook_mailwire_formatter(). Using this hooks any mail formatting/sending module can register any number of formatters and senders. Everytime drupal_mail is called the formatters and senders are called depending on module, key and weight settings.

I've written patches for mimemail, maillog and smtp to integrate with mailwire.
See: #1125778: Integration with Mailwire and http://drupal.org/sandbox/pluess/1179696

I Hope this is pushing the integration of all the nice mail sending and formatting modules ahead!

The Patch is done via "git format-patch"
If the patch is applyed, can you please use:
git am --signoff --ignore-whitespace < integration_with_mailwire.patch
this should keep the commiter for my account :-).

CommentFileSizeAuthor
integration_with_mailwire.patch4.99 KBpluess

Comments

pluess’s picture

The mailwire module can now be found at http://drupal.org/project/mailwire .

sgabe’s picture

Mail System allows you to select different classes for formatting and sending.

pluess’s picture

Yes, but only one formatter and one sender at the same time. If you want mimemail to format your message, then smtp to send it and then maillog to log it you need a way to integrate this modules.

Currently all this modules (and some more) do register itself as default mailsystem by setting the mail_system variable. This means they cannot coexist. By design there can be only one default mailsystem in D7.

Mailwire solves this problem by providing a central registry. Every mail formatter/sender registers itself by implementing a hook. This way several mail formatting or sending modules can coexist and they do not need to know from each other.
Actually this is the same thing as we all know from hook_menu or hook_node_info.

pillarsdotnet’s picture

By design there can be only one default mailsystem in D7.

I have a patch and a working implementation to allow multiple mailsystems to cooperate and co-exist.

The Mailwire module has some good ideas, but also many problems.

sgabe’s picture

Status: Active » Postponed

Let's postpone this a little and see what will be the case with Mailwire in the near future (eg. #1198086: Review of Mail Wire module).

pounard’s picture

Issue summary: View changes

Actually I think that the "mailsystem" module dependency should be removed from this module.

The mailsystem module does a lot of ugly stuff, such as introspecting the Drupal registry at every request, and this does not make any sense, while this module (mimemail) does only one job and does it really well.

I integrated is using a custom SMTP transport layer that does provide a mailsystem-like feature (it is unfinished work yet but still works better than mailsystem + smtp modules altogether) and I'd very much like to definitely get rid of this terrible mailsystem module.

My custom STMP layer lays there: https://github.com/makinacorpus/drupal-netsmtp

tony.herr’s picture

Is this still an issue? This page - https://www.drupal.org/node/1200142 seems to indicate that it's possible to use Mail System + SMTP + Mime Mail together now.

tr’s picture

Assigned: pluess » Unassigned
Status: Postponed » Closed (works as designed)

As far as I know, this is not a problem any more.