Fix redirection when changing user type to a not registered user (Closes #824)
[platal.git] / bin / emails.broken.php
index 626286e..9d3be0d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -75,11 +75,11 @@ foreach ($emails as $_email) {
             echo "$email : seule adresse active de {$x['prenom']} {$x['nom']}\n";
         } else {
             $mail = new PlMailer('emails/broken.mail.tpl');
-            $mail->addTo("\"{$x['prenom']} {$x['nom']}\" <{$x['alias']}@polytechnique.org>");
+            $mail->addTo("\"{$x['prenom']} {$x['nom']}\" <{$x['alias']}@" . $globals->mail->domain . '>');
             $mail->assign('x', $x);
             $mail->assign('email', $email);
             $mail->send();
-            echo "$email : mail envoyé\n";
+            echo "$email : mail envoyé\n";
         }
 
         if (!isset($list[$x['alias']])) {
@@ -119,4 +119,5 @@ $fo = fopen($output, 'w+');
 fwrite($fo, $csv);
 fclose($fo);
 
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>