Support for Mime Mail module?
| Project: | Subscriptions |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I thought I'd put this out there to see what you think.
When I first started using Subscriptions module, I tried to get it to work sending HTML email using the Mail Edit module (http://drupal.org/project/mail_edit) as described in your documentation, but failed. I couldn't get it to reliably use my template settings, etc. Well, to make a long story short(er) I gave up on Mail Edit and decided to try using Mime Mail module instead. (http://drupal.org/project/mimemail)
In order for this to work, however, I had to directly edit the file from your module, named subscriptions_mail.templates.inc, to match my theme. It works wonderfully, however, I do have fears that one day you may decide to change something in the file, in which case I'll have to re-engineer the thing again.
In light of this, I'm putting up this feature request to see if you could look into supporting a more generalized method on theming for Subscriptions emails. After installing Mime Mail, I've discovered that there are a lot of other modules that email from Drupal sites that seem to use a common method of editing simple themes for their output. In every case, I've been able to just enter in a text field the HTML for my theme to get them to output perfectly themed HTML emails (through the use of Mime Mail) straight from the UI of the modules.
Here are a couple that use a "Fill-in-the-text-area with a template and Tokens" approach to setting up email output formatting:
- Advanced User (http://drupal.org/project/advuser) notifies admin when a user modifies or creates their profile.
- Comment Mail (http://drupal.org/project/commentmail) notifies admin or moderator when a new comment is posted
- Modr8 (http://drupal.org/project/modr8) notifies admin of new content, and poster of said content when it is approved/denied
- Drupal User Settings (v6 Core) user welcome messages, email verifications, account activations/blocked/deleted notifications
These all use a plain text area, and provide a (sometimes long) list of "!xxxxx" style tokens that may be used in the text area for outgoing emails... sometimes there is one for each type of outgoing email. THIS is very useful.
My question is this: Could you provide some kind of setting like these modules do, for Subscriptions module, so one doesn't need to directly modify a core module file to get reliable HTML emails out? With tokens?
I'd also love to be able to have tokens available to place an ad from Advertisements Module (http://drupal.org/project/ad) into the email this way, or modify my template in a setting rather than hacking a file.
Attached is a sample of the file I've modified so you can see what I ended up doing to get my template to work. :-)
Making your module work in this way would make it possible to easily have HTML email using Mime Mail module instead of being subject to the quirks of Mail Edit module.
| Attachment | Size |
|---|---|
| subscriptions_mail.templates.inc_.zip | 3.05 KB |

#1
Here is a link to an issue for why I couldn't get HTML email to work with Mail Edit: http://drupal.org/node/212224
#2
Thank you for your well-thought-out and well-documented post. This is definitely interesting, but it looks like a big issue and I won't be able to get to it real soon.
If someone wants to work on this, I'll definitely support it, otherwise porting to D7 will probably get priority.
#3
Hmm, an interesting alternative was posted in #212224: Send HTML emails...
#4
Yeah... I saw that. It seemed even more 'hack-ey' than the way I'm doing it. :-)
#5
subscribing.