Jump to:
| Project: | Mime Mail |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | pluess |
| Status: | postponed |
Issue Summary
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 another mail modules 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 :-).
| Attachment | Size |
|---|---|
| integration_with_mailwire.patch | 4.99 KB |
Comments
#1
The mailwire module can now be found at http://drupal.org/project/mailwire .
#2
Mail System allows you to select different classes for formatting and sending.
#3
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.
#4
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.
#5
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).