Updates the ChangeLog.
[platal.git] / bin / emails.broken.php
index becd859..ef9cb39 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -23,9 +23,8 @@
 ini_set('include_path', '.:../include:/usr/share/php');
 
 require_once('connect.db.inc.php');
-require_once('xorg.inc.php');
 require_once('emails.inc.php');
-require_once('../classes/plmailer.php');
+require_once('plmailer.php');
 
 $opts = getopt('i:o:');
 if (($opts['i'] && $opts['i'] == '-') || empty($opts['i'])) {
@@ -75,7 +74,7 @@ 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();
@@ -88,7 +87,7 @@ foreach ($emails as $_email) {
             $list[$x['alias']][] = $email;
         }
     } else {
-        echo "$email : cette addresse n'est pas dans la base\n";
+        echo "$email : cette adresse n'est pas dans la base\n";
     }
 }