From 95ecc4748ee81b35d01c8b1d4f04d4ff8fc0a0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Sat, 13 Jan 2007 14:11:30 +0000 Subject: [PATCH] fix: mail2infolog: sender / from was not detected, strip_tags was not working as expected --- 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 15b43dc1ae..e89881797c 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -1163,7 +1163,7 @@ class uiinfolog } } - $body = ExecMethod2('felamimail.bocompose.convertHTMLToText',$_body); + $body = strip_tags($_body); $this->edit($this->bo->import_mail( implode(',',$_to_emailAddress),$_subject,$body,$attachments,'' )); @@ -1175,12 +1175,12 @@ class uiinfolog $bopreferences =& CreateObject('felamimail.bopreferences'); $bofelamimail->openConnection(); - $headers = $bofelamimail->getMessageHeader($mailbox,$uid); + $headers = $bofelamimail->getMessageHeader($uid); $bodyParts = $bofelamimail->getMessageBody($uid,''); $attachments = $bofelamimail->getMessageAttachments($uid); - if (isset($headers->senderaddress)) $mailaddress = $bofelamimail->decode_header($headers->senderaddress); - elseif (isset($headers->fromaddress)) $mailaddress = $bofelamimail->decode_header($headers->fromaddress); + if (isset($headers['FROM'])) $mailaddress = $bofelamimail->decode_header($headers['FROM']); + elseif (isset($headers['SENDER'])) $mailaddress = $bofelamimail->decode_header($headers['SENDER']); $subject = $bofelamimail->decode_header($headers->Subject); @@ -1188,7 +1188,7 @@ class uiinfolog { // add line breaks to $bodyParts $newBody = $GLOBALS['egw']->translation->convert($bodyParts[$i]['body'], $bodyParts[$i]['charSet']); - $newBody = ExecMethod2('felamimail.bocompose.convertHTMLToText',$newBody); + $newBody = strip_tags($newBody); $newBody = explode("\n",$newBody); // create it new, with good line breaks reset($newBody);