Skip to content

Commit

Permalink
fix for issue #231
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmunro committed Oct 26, 2017
1 parent e4e2251 commit 5bcce51
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions modules/imap/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,17 +409,21 @@ public function process() {
header('Content-Type: '.$part_struct['type'].'/'.$part_struct['subtype'].$charset);
header('Content-Transfer-Encoding: binary');
ob_end_clean();
$output_line = '';
while($line = $imap->read_stream_line()) {
if ($encoding == 'quoted-printable') {
echo quoted_printable_decode($line);
$line = quoted_printable_decode($line);
}
elseif ($encoding == 'base64') {
echo base64_decode($line);
}
else {
echo $line;
$line = base64_decode($line);
}
echo $output_line;
$output_line = $line;
}
if ($part_struct['type'] == 'text') {
$output_line = preg_replace("/\)(\r\n)$/m", '$1', $output_line);
}
echo $output_line;
Hm_Functions::cease();
}
}
Expand Down

0 comments on commit 5bcce51

Please sign in to comment.