Alternc
latest
Alternc logiel libre pour l'hébergement
mail_dodelete.php
Go to the documentation of this file.
1
#!/usr/bin/php -q
2
<?php
3
// Launch the hooks for a real deletion of the mail whose ID is in parameters
4
5
$mail_id
= @intval($argv[1]);
6
if
(empty(
$mail_id
) ) {
7
die(
'You must specified a valid mail id (integer)'
);
8
}
9
10
require_once(
"/usr/share/alternc/panel/class/config_nochk.php"
);
11
12
// Wich account should I be ?
13
$uid
=$mail->get_account_by_mail_id(
$mail_id
);
14
15
// Ok, so be it
16
$mem
->su(
$uid
);
17
18
// Get the mails informations
19
$mailinfos
=$mail->get_details(
$mail_id
);
20
// AND CALL THE HOOKS
21
$hooks
->invoke(
'hook_mail_delete_for_real'
, array(
$mail_id
,
$mailinfos
[
'address'
].
'@'
.
$mailinfos
[
'domain'
] ));
22
23
// Bye bye
24
25
echo
"\n\n"
;
26
27
?>
$hooks
$hooks
Definition:
bootstrap.php:74
$mem
$mem
Definition:
bootstrap.php:71
$uid
$uid
Definition:
mail_dodelete.php:13
$mailinfos
$mailinfos
Definition:
mail_dodelete.php:19
$mail_id
$mail_id
Definition:
mail_dodelete.php:5
src
mail_dodelete.php
Generated on Sat Sep 16 2023 12:00:04 for Alternc by
1.9.1