From a5d124ffad23cf2b4925519ffd7dce623843211d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Sun, 22 Oct 2006 18:02:15 +0000 Subject: [PATCH] handle html messages in mail2infolog. We use the function in bocompose as we have no generalized html2text converter in the api yet --- infolog/inc/class.uiinfolog.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index c9604ef77a..3fc8809c41 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -1146,8 +1146,9 @@ class uiinfolog } } + $body = ExecMethod2('felamimail.bocompose.convertHTMLToText',$_body); $this->edit($this->bo->import_mail( - implode(',',$_to_emailAddress),$_subject,$_body,$attachments,'' + implode(',',$_to_emailAddress),$_subject,$body,$attachments,'' )); exit; } @@ -1166,13 +1167,12 @@ class uiinfolog $subject = $bofelamimail->decode_header($headers->Subject); - // this should be a method of felamimail! - // We also need a html2text converter there! for($i=0; $itranslation->convert($bodyParts[$i]['body'], $bodyParts[$i]['charSet']); - $newBody = explode("\n",$newBody); + $newBody = $GLOBALS['egw']->translation->convert($bodyParts[$i]['body'], $bodyParts[$i]['charSet']); + $newBody = ExecMethod2('felamimail.bocompose.convertHTMLToText',$newBody); + $newBody = explode("\n",$newBody); // create it new, with good line breaks reset($newBody); while(list($key,$value) = @each($newBody))