diff --git a/web/api.php b/web/api.php
index 4b1839f..0237ed7 100644
--- a/web/api.php
+++ b/web/api.php
@@ -21,6 +21,20 @@ if(!empty($email)){
switch($action)
{
+ case 'del':
+ $id = intval($_REQUEST['mid']);
+ if(!is_dir($dir))
+ $o = array('status'=>'err','reason'=>'No emails received on this address');
+ else if(!is_numeric($id) || !emailIDExists($email,$id))
+ $o = array('status'=>'err','reason'=>'Invalid Email ID');
+ else
+ {
+ if(unlink($dir.DS.$id.'.json'))
+ $o = array('status'=>'ok');
+ else
+ $o = array('status'=>'err','reason'=>'Could not delete email');
+ }
+ break;
case 'getdoms':
$settings = loadSettings();
if($settings['DOMAINS'])
diff --git a/web/css/opentrashmail.css b/web/css/opentrashmail.css
index 549b7b0..dc39033 100644
--- a/web/css/opentrashmail.css
+++ b/web/css/opentrashmail.css
@@ -5,7 +5,3 @@ body {
padding: 3rem 1.5rem;
text-align: center;
}
-
-.anemail{
- cursor: pointer;
-}
\ No newline at end of file
diff --git a/web/js/opentrashmail.js b/web/js/opentrashmail.js
index fb2aa05..95c924e 100644
--- a/web/js/opentrashmail.js
+++ b/web/js/opentrashmail.js
@@ -37,10 +37,13 @@ function renderEmail(email,id,data)
btns+=''+filename+''
}
$("#main").html('
'+email+'
\
- \
+ \
'+(data.parsed.body?'
'+data.parsed.body+'
':'')+' \
'+(data.parsed.htmlbody?'
'+data.parsed.htmlbody+'':'')+' \
'+(btns!==''?'
Attachments
'+btns:'')+'\
+
\
+
Raw Email
'+data.raw+'
\
+
\
')
}
@@ -63,6 +66,7 @@ function loadAccount(email)
Date
\
From
\
Subject
\
+
Action
\
\
\
\
@@ -119,18 +123,19 @@ function updateEmailTable()
var datestring = moment.unix(parseInt(dateofemail/1000)).format(data.dateformat); // Use moment.js formatting
var ed = data.emails[em]
$("#emailtable").append('\
-