All emails sent using Forward module show all HTML tags? It's possible to send plain text email only?

Thanks in advance.

Comments

fax8’s picture

same problem here

jfurry’s picture

Priority: Normal » Critical

Same as well, the e-mails are filled with html that no e-mail application I've tried can process.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
   <style>
     <!--
       html, body {margin:0; padding:0; background-color:#fff;}
       #container {margin:0 auto; width:670px; font:normal 10pt arial,helvetica,sans-serif;}
       #header {width:670px; margin:0; text-align:center;}
       #body {width:630px; margin:0; padding:5px 20px; text-align:left; background-color:#fff;}
       #footer {width:670px; height:35px; margin:0; padding:5px 0 0 0; font-size:9pt; text-align:center; color:#fff;}
       .ad_footer, .message, .article  {font-size:10pt; padding:0;}
       .frm_title, .frm_txt {font-size:12pt;}
       .frm_txt {padding-bottom:15px;}
       .links {font-size:10pt; font-style:italic;}
       .article_title {font-size:12pt;}
       .dyn_content { padding-top:10px;}
     -->
   </style>
   <base href="http://www.test.com/" />
 </head>
 <body>
   <div id="container">
     <div id="header"><a href="http://www.test.com/"><img src="" border="0" alt="Test"></a></div>
     <div id="body">
       <div class="frm_txt"><a href="mailto:webmaster@ottawabicycleclub.ca">admin</a> thought you would like to see the Test.Com web site.</div>
       <div class="frm_title">Message from Sender:</div>
       <div class="frm_txt"><p><b>test</b></p></div>
       <div><b><a href="http://www.test.com/forward/emailref/58">Test e-mail</a></b>
       <br /><i>by <em>admin</em></i>
       </div>
       <div class="article"><p><span class="postbody">Test e-mail    </p>
</div>
       <div class="links"><a href="http://www.test.com/forward/emailref/58">Click here to read more on our site</a></div>
       <div class="dyn_content"><br /></div>
       <div class="ad_footer"><br /><br></div>
     </div>
     <div id="footer"></div>
   </div>
 </body>
</html>

Not exactly readable. Are well missing a config option? Or is there something wrong with this module. I would guess that the mime type isn't being set properly

freeman-1’s picture

I'm running Drupal 5.1 with Forward 5.x-1.x-dev.

Same problem with HTML emails - keeps seeing the raw html code.

I tracked it down to these two lines from forward.module:564-565 :

  $header[] = "MIME-Version: 1.0";
  $headers[] = "Content-type: text/html; charset=utf-8\n";

There are mainly 2 errors :-

1. the 1st line : variable $header should be $headers.

2. the module now uses the drupal_mail function - which takes the headers as an array with assoc keys.

I've resolved this issue by amending the lines to :

  $headers['MIME-Version'] = '1.0';
  $headers['Content-Type'] = "text/html; charset=utf-8";

Note specifically that 'Content-Type' needs to be spelled with capital 'T' for 'Type'. Otherwise, it doesn't replace the drupal_mail default header.

Tested with Yahoo, Hotmail and Gmail webmails.

seanr’s picture

Status: Active » Fixed

Fixed in head and 5.x. Thanks for the help.

tixx’s picture

Great. Now it works.

Thanks a lot.

Anonymous’s picture

Status: Fixed » Closed (fixed)
ericpugh’s picture

This didn't fix the problem for me. (displaying the email body as mark-up). I corrected the header issues listed above, no good. Uninstalled/reinstalled forward, no good. Ran update.php. Nope.

Anybody have an idea about this? Is there a table somewhere with a left over entry, or maybe something with SMTP (which appears to be correctly configured) that would cause this? I'm stumped. (as usual :-))
thanks

seanr’s picture

This does in fact appear to be a problem with SMTP. That is handled by a separate module, so I'd suggest creating a new support request there. I don't use SMTP on any of my servers, so I've got no easy way to test this.

suzanne.aldrich’s picture

There's a patch for SMTP module now: http://drupal.org/node/195622

christopherhanson’s picture

thanks for that freeman, was working in blueyonde mail but not gmail, now gmail works :D cheers m8