we have an issue with the addition of theme css. We want html mail, but not the css. (all the theme css is usually way over bloated, and causes email's to me denied by some mail servers).

I think that the module should use no css by default (good for most users), and only include css if it is set in the mime mail settings. The option might be to use mail.css, or the full theme css (or maybe even a select box for css files to use?).

I'd like some feedback about this from interested parties and the maintainers, and I'd be willing to help code this for 6.x

Cheers
Frank

Comments

allartk’s picture

hi,

You can change this behaviour by overriding the theme function in your template.php I think that is enough for most (at least for me).

e.g.

<?php
function phptemplate_mimemail_message($body, $mailkey = NULL)
{
  $output = '<html><head>';
  $output .= '</head><body>'. $body .'</body></html>';  
 
  return preg_replace('/\s+|\n|\r|^\s|\s$/', ' ', $output);
} ?>
theorichel’s picture

I was trying this out and pasted that code at the bottom of my template.php. However I got a Parse error: "unexpected '<' in" line <?php
I do not intend to study php, but this seems rather basic and I should know what is happening. Can you please tell me what I do wrong?

Thanks

Theo Richel

theorichel’s picture

Found out myself meanwhile. Now trying to find out what this code actually does.
....Which is:

Fatal error: Cannot redeclare phptemplate_mimemail_message() (previously declared in /home/www/klimatosoof/sites/all/modules/simplenews_template/simplenews_template.module:110) in /home/www/klimatosoof/sites/default/themes/themagrk/template.php on line 256

No idea how to interpret this, but I know that since I set Mimemail tot send all messages my Simplenews_templates are not used any more. Instead I get an html mail that is supposed to look like my site. Switching the mimemail option back doesnt restore this.

allartk’s picture

Sorry! The piece of code was based on the drupal 6.

I never done this in drupal 5.
My first guess is that you can do this by commenting out (putting // at the beginning of the line ) line 59 simplenews_template.module It contains the variable $style.

aharown07’s picture

+1 for this feature request

The code above is also not working for me... could load any pages after adding it.
Can you give me a D5.x version?

sgabe’s picture

Priority: Critical » Normal
Status: Active » Closed (duplicate)