Closed (won't fix)
Project:
Subscriptions
Version:
5.x-2.0-beta12
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2008 at 20:46 UTC
Updated:
31 Aug 2008 at 14:53 UTC
My goal is to use Subscriptions as a newsletter-type service where I (as site admin) don't have to physically manage what content goes in a user's 'subscription' and allow them to choose what site content they want in their subscription. With the interface I've seen in Subscriptions, it seems like it will do the desired customizing of content to include.
Can the email sent out be themed into HTML format? Include the site's existing theme? Customize what fields of the different node types be included? Teasers vs Full body?
I seen this posting:
http://drupal.org/node/199317
But that seems to want to do the opposite (strip otu the HTML tags and send as very plain text).
Comments
Comment #1
salvisNo, sending out HTML emails is not possible. If you need that, you have to look elsewhere.
Comment #2
light-blue commentedYes you can! Open subscriptions_mail.module and
Replace
function subscriptions_mail_mail_alter(&$mailkey, &$to, &$subject, &$body, &$from, &$headers) {
$body = preg_replace('/ +(\r?\n)/', '\\1', $body);
}
With
function subscriptions_mail_mail_alter(&$mailkey, &$to, &$subject, &$body, &$from, &$headers) {
$headers["Content-Transfer-Encoding"] = '8bit';
$headers["Content-Type"] = "text/html; charset='utf-8';";
$body = preg_replace('/ +(\r?\n)/', '\\1', $body);
}
Comment #3
mariano.barcia commentedKudos to the great work on this module! I'm trying it in replacement of notifications, also be using it with the OG plugin.
However, I am needing this functionality, as I am having a strong demand of this from 2 of my customers.
Not really aware of the risks of using the approach suggested? Because... if there were no risks/drawback, why is it not getting into the module's code uh?
Thanks in advance
Comment #4
salvisThere's no risk, I just don't think it can be done in a satisfactory way, and so, any effort spent in that direction would be wasted.
Personally, I don't like HTML mail, but I see that it is a popular request, and I wouldn't let my personal view get in the way, if someone wants to take a stab at implementing it.
I just won't do it, and I won't maintain it, because I think, even if it flies, it will create a ton of tweaking requests and issues with theme incompatibilities.