I was experiencing severe formatting issues when importing mailman lists from an MBOX. I tried Full HTML input format with zero filters. Still, HTML was being cut off in the node body no matter what. After identifying where in the code the issue was being caused (mailhandler.module):

$tmp = array_slice($commands['lines'], $commands['endcommands'], $commands['i'] - $commands['endcommands']);

I re-wrote it to:

$tmp = $commands['lines'];
for ($i = 1; $i <= $commands['endcommands']; $i++) {
  array_shift($tmp);
}

Please review and confirm no intended functionality has been lost. I've tested the patch in my instance and it works; there was no more cut off HTML in the node body. Patch attached.

CommentFileSizeAuthor
mailhandler-6.x-1.11-fixnodebody.patch744 bytessdemi

Comments

danepowell’s picture

Component: Code » Mailhandler
Status: Needs review » Closed (duplicate)

Yeah, commands in HTML bodies aren't working in 6.x-1.x. Please see #618690: Commands in HTML emails not processed