array ("post", "array", ""), "domain_id" => array ("post", "integer", ""), "confirm" => array("post", "string", "n"), ); getFields($fields); if (!is_array($d)) { $d[]=$d; } reset($d); include_once ("head.php"); if ($confirm=="y") { while (list($key,$val)=each($d)) { // Validate that this email is owned by me... if (!($email = $mail->is_it_my_mail($val))) { continue; } // Search for that address: $db->query("SELECT a.id, NOT ISNULL(m.id) AS islocal FROM address a LEFT JOIN mailbox m ON m.address_id=a.id WHERE a.id= ? ;", array($val)); if (!$db->next_record()) { $msg->raise('Error', "mail", _("The email %s does not exist, it can't be deleted"), $email); continue; } if ($mail->delete($val)) { if ($db->f("islocal")) { $msg->raise('Ok', "mail", _("The email %s has been marked for deletion"), $email); } else { $msg->raise('Ok', "mail", _("The email %s has been successfully deleted"), $email); } } } include("mail_list.php"); exit(); } ?>