fix: mail2infolog: sender / from was not detected, strip_tags was not working as expected

This commit is contained in:
Cornelius Weiß 2007-01-13 14:11:30 +00:00
parent 4057b240a8
commit 95ecc4748e

View File

@ -1163,7 +1163,7 @@ class uiinfolog
} }
} }
$body = ExecMethod2('felamimail.bocompose.convertHTMLToText',$_body); $body = strip_tags($_body);
$this->edit($this->bo->import_mail( $this->edit($this->bo->import_mail(
implode(',',$_to_emailAddress),$_subject,$body,$attachments,'' implode(',',$_to_emailAddress),$_subject,$body,$attachments,''
)); ));
@ -1175,12 +1175,12 @@ class uiinfolog
$bopreferences =& CreateObject('felamimail.bopreferences'); $bopreferences =& CreateObject('felamimail.bopreferences');
$bofelamimail->openConnection(); $bofelamimail->openConnection();
$headers = $bofelamimail->getMessageHeader($mailbox,$uid); $headers = $bofelamimail->getMessageHeader($uid);
$bodyParts = $bofelamimail->getMessageBody($uid,''); $bodyParts = $bofelamimail->getMessageBody($uid,'');
$attachments = $bofelamimail->getMessageAttachments($uid); $attachments = $bofelamimail->getMessageAttachments($uid);
if (isset($headers->senderaddress)) $mailaddress = $bofelamimail->decode_header($headers->senderaddress); if (isset($headers['FROM'])) $mailaddress = $bofelamimail->decode_header($headers['FROM']);
elseif (isset($headers->fromaddress)) $mailaddress = $bofelamimail->decode_header($headers->fromaddress); elseif (isset($headers['SENDER'])) $mailaddress = $bofelamimail->decode_header($headers['SENDER']);
$subject = $bofelamimail->decode_header($headers->Subject); $subject = $bofelamimail->decode_header($headers->Subject);
@ -1188,7 +1188,7 @@ class uiinfolog
{ {
// add line breaks to $bodyParts // add line breaks to $bodyParts
$newBody = $GLOBALS['egw']->translation->convert($bodyParts[$i]['body'], $bodyParts[$i]['charSet']); $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); $newBody = explode("\n",$newBody);
// create it new, with good line breaks // create it new, with good line breaks
reset($newBody); reset($newBody);