public static function es_sentmail_delete($id = 0)
 {
     global $wpdb;
     $prefix = $wpdb->prefix;
     $Sentdetails = array();
     $Sentdetails = es_cls_sentmail::es_sentmail_select($id, 0, 1);
     if (count($Sentdetails) > 0) {
         $es_deliver_sentguid = $Sentdetails['es_sent_guid'];
         if ($es_deliver_sentguid != "") {
             $sSql = $wpdb->prepare("DELETE FROM `" . $prefix . "es_deliverreport` WHERE `es_deliver_sentguid` = %s", $es_deliver_sentguid);
             $wpdb->query($sSql);
         }
         $sSql = $wpdb->prepare("DELETE FROM `" . $prefix . "es_sentdetails` WHERE `es_sent_id` = %d LIMIT 1", $id);
         $wpdb->query($sSql);
     }
     return true;
 }
template/template.js"></script>
<div class="wrap">
  <div id="icon-plugins" class="icon32"></div>
    <h2><?php 
_e(ES_PLUGIN_DISPLAY, 'email-subscribers');
?>
</h2>
	<h3><?php 
_e('Preview Mail', 'email-subscribers');
?>
</h3>
    <div class="tool-box">
	<div style="padding:15px;background-color:#FFFFFF;">
	<?php 
$preview = array();
$preview = es_cls_sentmail::es_sentmail_select($did, 0, 0);
$preview = str_replace('###NAME###', "Username", $preview);
$preview = str_replace('###EMAIL###', "Useremail", $preview);
echo stripslashes($preview['es_sent_preview']);
?>
	</div>
	<div class="tablenav">
	  <h2>
		<a class="button add-new-h2" href="<?php 
echo ES_ADMINURL;
?>
?page=es-sentmail&pagenum=<?php 
echo $pagenum;
?>
"><?php 
_e('Back', 'email-subscribers');
</h2>
	<h3><?php 
_e('Sent Mails', 'email-subscribers');
?>
</h3>
    <div class="tool-box">
	<?php 
$pagenum = isset($_GET['pagenum']) ? absint($_GET['pagenum']) : 1;
es_cls_security::es_check_number($pagenum);
$limit = 30;
$offset = ($pagenum - 1) * $limit;
$total = es_cls_sentmail::es_sentmail_count(0);
$fulltotal = $total;
$total = ceil($total / $limit);
$myData = array();
$myData = es_cls_sentmail::es_sentmail_select(0, $offset, $limit);
?>
	<form name="frm_es_display" method="post" onsubmit="return _es_bulkaction()">
      <table width="100%" class="widefat" id="straymanage">
        <thead>
          <tr>
			<th scope="col"><?php 
_e('View Reports', 'email-subscribers');
?>
</th>
			<th scope="col"><?php 
_e('Preview', 'email-subscribers');
?>
</th>
			<th scope="col"><?php 
_e('Source', 'email-subscribers');