Author Topic: 1.5.2 - email module - original HTML message not included in the reply  (Read 2235 times)

Nuno Zimas

  • Full Member
  • ***
  • Posts: 127
    • View Profile
In certain cases, at random, the original message is not included on the reply area.
Might be related to the WYSIWYG editor stripping off particular kinds of markup tags.

This usually happens in messages which are heavily formatted.
OS: GNU/Linux (PCLinuxOS) | Browser: Firefox 3.6.x and Chromium 5.0.x | FengOffice 1.7 RC

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: 1.5.2 - email module - original HTML message not included in the reply
« Reply #1 on: August 28, 2009, 06:12:05 pm »
Hi,
this will be fixed in next release.

if you want to fix it in your installation, you have to replace lines 66-73 of /application/controllers/MailController.class.php
with these ones:
Code: [Select]
$re_info = $this->build_original_mail_info($original_mail);
$pos = stripos($re_body, "<body");
$pos = stripos($re_body, ">", $pos);
if ($pos !== FALSE) {
$re_body = substr($re_body, 0, $pos+1) . $re_info . substr($re_body, $pos+1);
} else {
$re_body = $re_info . $re_body;
}

Also you have to replace lines 1165-1174 of the same file with these ones
Code: [Select]
$body = $original_mail->getBodyHtml() == '' ? $original_mail->getBodyPlain() : $original_mail->getBodyHtml();

$fwd_info = $this->build_original_mail_info($original_mail);
$pos = stripos($body, "<body");
$pos = stripos($body, ">", $pos);
if ($pos !== FALSE) {
$fwd_body = substr($body, 0, $pos+1) . $fwd_info . substr($body, $pos+1);
} else {
$fwd_body = $fwd_info . $body;
}
Have to replace in 2 places because this was also happening when forwarding mails.

regards