Update table list.
[platal.git] / bin / cron / axletter.send.php
index 47366a5..6fa2f56 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/php5 -q
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once('./connect.db.inc.php');
-require_once("../../modules/axletter/axletter.inc.php");
+require_once './connect.db.inc.php';
+require_once '../../modules/axletter/axletter.inc.php';
+ini_set('memory_limit', '128M');
 
 $al = AXLetter::toSend();
 if ($al) {
     echo "Envoi de la lettre \"{$al->title()}\"\n\n";
-    echo " " . date("H:i:s") . " -> début de l'envoi\n";
-    $al->sendToAll();
-    echo " " . date("H:i:s") . " -> fin de l'envoi\n";
+    echo ' ' . date("H:i:s") . " -> début de l'envoi\n";
+    $emailsCount = $al->sendToAll();
+    echo ' ' . date("H:i:s") . " -> fin de l'envoi\n\n";
+    echo $emailsCount . " emails ont été envoyés lors de cet envoi.\n";
 }
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: