Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
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 ?>