mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
handle html messages in mail2infolog. We use the function in bocompose as we have no generalized html2text converter in the api yet
This commit is contained in:
parent
2c56e220bc
commit
a5d124ffad
@ -1146,8 +1146,9 @@ class uiinfolog
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$body = ExecMethod2('felamimail.bocompose.convertHTMLToText',$_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,''
|
||||||
));
|
));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -1166,13 +1167,12 @@ class uiinfolog
|
|||||||
|
|
||||||
$subject = $bofelamimail->decode_header($headers->Subject);
|
$subject = $bofelamimail->decode_header($headers->Subject);
|
||||||
|
|
||||||
// this should be a method of felamimail!
|
|
||||||
// We also need a html2text converter there!
|
|
||||||
for($i=0; $i<count($bodyParts); $i++)
|
for($i=0; $i<count($bodyParts); $i++)
|
||||||
{
|
{
|
||||||
// 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 = explode("\n",$newBody);
|
$newBody = ExecMethod2('felamimail.bocompose.convertHTMLToText',$newBody);
|
||||||
|
$newBody = explode("\n",$newBody);
|
||||||
// create it new, with good line breaks
|
// create it new, with good line breaks
|
||||||
reset($newBody);
|
reset($newBody);
|
||||||
while(list($key,$value) = @each($newBody))
|
while(list($key,$value) = @each($newBody))
|
||||||
|
Loading…
Reference in New Issue
Block a user