Benachrichtige vmail-useracount über neue Mailboxen
bernd

bernd commited on 2007-12-03 10:40:54
Zeige 1 geänderte Dateien mit 8 Einfügungen und 0 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@831 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -111,10 +111,12 @@ function save_vmail_account($account)
111 111
   $account['domain'] = (int) $account['domain'];
112 112
   $domainlist = get_vmail_domains();
113 113
   $valid_domain = false;
114
+  $domainname = NULL;
114 115
   foreach ($domainlist as $dom)
115 116
   {
116 117
     if ($dom->id == $account['domain'])
117 118
     {
119
+      $domainname = $dom->domainname;
118 120
       $valid_domain = true;
119 121
       break;
120 122
     }
... ...
@@ -218,6 +220,12 @@ function save_vmail_account($account)
218 220
     $query .= "WHERE id={$id} LIMIT 1;";
219 221
   }
220 222
   db_query($query); 
223
+
224
+  if ($type == 'mailbox')
225
+  {
226
+    # notify the vmail subsystem of this new account
227
+    mail('vmail@schokokeks.org', 'command', "user={$account['local']}\nhost={$domainname}", "X-schokokeks-org-message: command");
228
+  }
221 229
 }
222 230
 
223 231
 
224 232