diff options
author | friendica <info@friendica.com> | 2012-03-15 15:30:52 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-03-15 15:30:52 -0700 |
commit | 5d2c590fa93764c19043981e8398d97c6bae902b (patch) | |
tree | 5f8ac29b83606f9405430a7605dd42b8d66bef43 /include/email.php | |
parent | 5c75d40c0b6bee04d8c58a6f88ecbbe34684874a (diff) | |
parent | b5120888cf6e3aac29aa2a8d80bddcab73822e1e (diff) | |
download | volse-hubzilla-5d2c590fa93764c19043981e8398d97c6bae902b.tar.gz volse-hubzilla-5d2c590fa93764c19043981e8398d97c6bae902b.tar.bz2 volse-hubzilla-5d2c590fa93764c19043981e8398d97c6bae902b.zip |
Merge pull request #136 from annando/master
Mail improvements, item caching and so on
Diffstat (limited to 'include/email.php')
-rwxr-xr-x | include/email.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/email.php b/include/email.php index 659978b6e..a3449a424 100755 --- a/include/email.php +++ b/include/email.php @@ -1,5 +1,7 @@ <?php require_once('include/html2plain.php'); +require_once('include/msgclean.php'); +require_once('include/quoteconvert.php'); function email_connect($mailbox,$username,$password) { if(! function_exists('imap_open')) @@ -86,6 +88,7 @@ function email_get_msg($mbox,$uid) { if(! $struc->parts) { $ret['body'] = email_get_part($mbox,$uid,$struc,0, 'html'); + $html = $ret['body']; if (trim($ret['body']) == '') $ret['body'] = email_get_part($mbox,$uid,$struc,0, 'plain'); @@ -107,6 +110,17 @@ function email_get_msg($mbox,$uid) { else $ret['body'] = $text; } + + $ret['body'] = removegpg($ret['body']); + $msg = removesig($ret['body']); + $ret['body'] = $msg['body']; + $ret['body'] = convertquote($ret['body'], false); + + if (trim($html) != '') + $ret['body'] = removelinebreak($ret['body']); + + $ret['body'] = unifyattributionline($ret['body']); + return $ret; } |