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

salvis’s picture

Status: Active » Closed (won't fix)

No, sending out HTML emails is not possible. If you need that, you have to look elsewhere.

light-blue’s picture

Yes 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);
}

mariano.barcia’s picture

Kudos 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

salvis’s picture

There'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.