function mailhandler_mailbox_delete in Mailhandler 6
Delete a Mailhandler Mailbox from the database.
When $mailbox has 'mid' attribute defined, the database entry with this ID will be deleted.
Parameters
$mid: mailbox ID to be deleted.
Related topics
1 call to mailhandler_mailbox_delete()
- mailhandler_admin_delete_confirm_submit in ./
mailhandler.admin.inc - Submit hook for mailhandler_admin_delete_confirm form.
File
- ./
mailhandler.module, line 401 - Mailhandler module code.
Code
function mailhandler_mailbox_delete($mailbox) {
$mid = isset($mailbox['mid']) ? $mailbox['mid'] : $mailbox;
db_query("DELETE FROM {mailhandler} WHERE mid = %d", $mid);
// Record information message
mailhandler_watchdog_record('Mailbox %mailbox deleted.', array(
'%mailbox' => isset($mailbox['mail']) ? $mailbox['mail'] : $mid,
), WATCHDOG_INFO);
}