diff options
author | Thomas <rat@rlyeh-military-affairs> | 2012-03-19 21:53:13 +0000 |
---|---|---|
committer | Thomas <rat@rlyeh-military-affairs> | 2012-03-19 21:53:13 +0000 |
commit | 4f927392f8d3791e55d9bf695a967a28d6dbceb0 (patch) | |
tree | db91bcfa5db7f11bae45f1bc2b622ca540be3eb9 /include/email.php | |
parent | eb84a22da749264fa79829d27471002d9f1e287f (diff) | |
parent | 139a86dbd395f4601b29b9af97ac8ea190cce9f9 (diff) | |
download | volse-hubzilla-4f927392f8d3791e55d9bf695a967a28d6dbceb0.tar.gz volse-hubzilla-4f927392f8d3791e55d9bf695a967a28d6dbceb0.tar.bz2 volse-hubzilla-4f927392f8d3791e55d9bf695a967a28d6dbceb0.zip |
Merge remote-tracking branch 'main/master'
Diffstat (limited to 'include/email.php')
-rwxr-xr-x | include/email.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/email.php b/include/email.php index 659978b6e..8ea8145fb 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')) @@ -54,7 +56,7 @@ function email_msg_headers($mbox,$uid) { $raw_header = (($mbox && $uid) ? @imap_fetchheader($mbox,$uid,FT_UID) : ''); $raw_header = str_replace("\r",'',$raw_header); $ret = array(); - $h = split("\n",$raw_header); + $h = explode("\n",$raw_header); if(count($h)) foreach($h as $line ) { if (preg_match("/^[a-zA-Z]/", $line)) { @@ -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; } |