diff --git a/docker/Dockerfile b/docker/Dockerfile
index bc3687d..8e4d5f6 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -27,4 +27,4 @@ VOLUME /var/www/opentrashmail/data
EXPOSE 80 25
#CMD ["/bin/ash"]
-ENTRYPOINT ["/etc/start.sh"]
\ No newline at end of file
+ENTRYPOINT ["/etc/start.sh"]
diff --git a/web/rss.php b/web/rss.php
index fd0e80f..a7e10d8 100644
--- a/web/rss.php
+++ b/web/rss.php
@@ -1,102 +1,101 @@
-
-
- RSS for '.$email.'
- https://'.DOMAIN.'/#'.$email.'
- RSS Feed for email address '.$email.'
- '.date(DATE_RFC822,time()).'
+
+ RSS for ' . $email . '
+ https://' . DOMAIN . '/#' . $email . '
+ RSS Feed for email address ' . $email . '
+ ' . date(DateTime::RFC2822, time()) . '
- RSS for '.$email.'
+ RSS for ' . $email . '
https://raw.githubusercontent.com/HaschekSolutions/opentrashmail/master/web/imgs/logo_300.png
https://github.com/HaschekSolutions/opentrashmail
';
$emaildata = getEmailsOfEmail($email);
-foreach($emaildata as $id=>$d)
-{
- $data = getEmail($email,$id);
+foreach ($emaildata as $id => $d) {
+ $data = getEmail($email, $id);
//var_dump($data);
- $time = substr($id,0,-3);
- $date = date("Y-m-d H:i",$time);
+ $time = substr($id, 0, -3);
+ $date = date("Y-m-d H:i", $time);
$att_text = array();
$encl = array();
- if(is_array($data['parsed']['attachments']))
- foreach($data['parsed']['attachments'] as $filename)
- {
- $filepath = ROOT.DS.'..'.DS.'data'.DS.$email.DS.'attachments'.DS.$filename;
- $parts = explode('-',$filename);
+ if (is_array($data['parsed']['attachments']))
+ foreach ($data['parsed']['attachments'] as $filename) {
+ $filepath = ROOT . DS . '..' . DS . 'data' . DS . $email . DS . 'attachments' . DS . $filename;
+ $parts = explode('-', $filename);
$fid = $parts[0];
$fn = $parts[1];
- $url = 'https://'.DOMAIN.'/api.php?a=attachment&email='.$email.'&id='.$fid.'&filename='.$fn;
+ $url = 'https://' . DOMAIN . '/api.php?a=attachment&email=' . $email . '&id=' . $fid . '&filename=' . $fn;
//$encl[] = '';
$att_text[] = "$fn";
}
- $rss.='
+ $rss .= '
-
-
- '.date(DATE_RFC822,$time).'
- https://'.DOMAIN.'/#'.$email.'
+
+ ' . date(DateTime::RFC2822, $time) . '
+ https://' . DOMAIN . '/#' . $email . '
+ https://' . DOMAIN . '/api.php?a=load&email=' . $email . '&id=' . $id . '&raw=true
- Email to: '.(is_array($data['rcpts'])?htmlentities(implode(',',$data['rcpts'])):htmlentities($email)).'
- '.((count($att_text)>0)?'Attachments:
'.array2ul($att_text).'
':'').'
- View raw email
+ Email from: ' . htmlentities($data['from']) . '
+ Email to: ' . (is_array($data['rcpts']) ? htmlentities(implode(',', $data['rcpts'])) : htmlentities($email)) . '
+ ' . ((count($att_text) > 0) ? 'Attachments:
' . array2ul($att_text) . '
' : '') . '
+ View raw email
---------
- '.($data['parsed']['htmlbody']?$data['parsed']['htmlbody']:nl2br(htmlentities($data['parsed']['body']))).'
+ ' . ($data['parsed']['htmlbody'] ? $data['parsed']['htmlbody'] : nl2br(htmlentities($data['parsed']['body']))) . '
]]>
- './*((count($encl)>0)?implode('
',$encl):'').*/'
+ ' ./*((count($encl)>0)?implode('
',$encl):'').*/ '
';
- if(++$i>5) break;
+ //if (++$i > 5) break;
}
-$rss.='
+$rss .= '
';
echo $rss;
-function array2ul($array) {
+function array2ul($array)
+{
$out = "
";
- foreach($array as $key => $elem){
+ foreach ($array as $key => $elem) {
$out .= "- $elem
";
}
$out .= "
";
- return $out;
-}
\ No newline at end of file
+ return $out;
+}