Switch to mpack
authorJoey Schulze <joey@infodrom.org>
Sun, 12 Jan 2014 11:46:08 +0000 (12:46 +0100)
committerJoey Schulze <joey@infodrom.org>
Sun, 12 Jan 2014 11:46:08 +0000 (12:46 +0100)
 . attach both archive and errors as text

utils.php

index 9e5e005..dbf113f 100644 (file)
--- a/utils.php
+++ b/utils.php
@@ -182,10 +182,10 @@ function ordersatz_write($id, $dir, $send)
   if ($ret !== 0) {
     $fname = sprintf("ordersatz-%d-%d.tar.bz2", $id, time());
     $cmd = sprintf("tar cfj %s ordersatz.tex ordersatz_vars.tex ordersatz_items.tex ordersatz.out && " .
-                  "mail -s 'Probleme beim Compilieren des Ordersatzes %d' %s < %s && " .
+                  "mpack -s 'Probleme beim Compilieren des Ordersatzes %d' -d ordersatz.out %s %s && " .
                   "sendfile -Q -c='Probleme beim Compilieren des Ordersatzes %d' %s %s",
                   $fname,
-                  $id, ERROR_MAIL, $fname,
+                  $id, $fname, ERROR_MAIL,
                   $id, $fname, ERROR_SAFT);
     system($cmd);
     return "Probleme beim Compilieren des Ordersatzes";