$query = array();
$error = array();
foreach ($marked as $mail_id) {
- $mail = $DB->getMail($mail_id);
- if (is_object($mail) && true == $util->authorized($mail->recipient)) {
+ $recipient = $DB->getRecipient($mail_id);
+ if ($recipient && true == $util->authorized($recipient)) {
$query[] = "delete from msgs where mail_id = '$mail_id'";
$query[] = "delete from msgrcpt where mail_id = '$mail_id'";
$query[] = "delete from quarantine where mail_id = '$mail_id'";