]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 737: use To-Company and To-Name coverpage entries in the notification
authorLee Howard <faxguy@howardsilvan.com>
Tue, 21 Feb 2006 17:34:34 +0000 (17:34 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Tue, 21 Feb 2006 17:34:34 +0000 (17:34 +0000)
  message if they are available to use

CHANGES
util/notify.sh.in

diff --git a/CHANGES b/CHANGES
index 4940e0fc84930110291db670a74da420b8196392..481145410b6710856336bebdc4f555b4cae527d2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 
 Changelog
 
+* use To-Company and To-Name coverpage entries in the notification
+  message if they are available to use (21 Feb 2006)
 * add support for libtiff-3.8 (31 Jan 2006)
 * use PDF in q-files when appropriate (30 Jan 2006)
 * fix configure in vsnprintf detection (30 Jan 2006)
index 12e705a7360dbece6a281bd6eb36ed3e091bb46c..dc3b9b4f995d4689fda87f3c1920f263673e7a89 100644 (file)
@@ -210,6 +210,8 @@ parseQfile()
     /^doneop/    { p("doneop", $2); }
     /^number/    { p("number", $2); }
     /^external/    { p("number", $2); }        # override unprocessed number
+    /^receiver/    { p("receiver", $2); }
+    /^company/    { p("company", $2); }
     /^sender/    { p("sender", $2); }
     /^mailaddr/    { p("mailaddr", $2); }
     /^owner/    { p("owner", $2); }
@@ -701,8 +703,18 @@ fi
 if [ "$jobtype" = "pager" ] ; then
     number=$pagernum
 fi
+DESTINATION="$receiver"
+if [ -n "$receiver" ] && [ -n "$company" ]; then
+    DESTINATION="$receiver at "
+fi
+DESTINATION="$DESTINATION$company"
+if [ -n "$DESTINATION" ]; then
+    DESTINATION="$DESTINATION ($number)"
+else
+    DESTINATION="$number"
+fi
 if [ "$WHY" = "done" ] ; then
-    putHeaders "$jobtag to $number completed"
+    putHeaders "$jobtag to $DESTINATION completed"
     echo " was completed successfully."
     echo "";
     if [ "$jobtype" = "facsimile" ] ; then
@@ -747,7 +759,7 @@ if [ "$WHY" = "done" ] ; then
         returnFaxImage "$RETURNFILETYPE"
     fi
 elif [ "$WHY" = "failed" ] ; then 
-    putHeaders "$jobtag to $number failed"
+    putHeaders "$jobtag to $DESTINATION failed"
     printf " failed because:\n    "
     printStatus "$faxstatus"
     returnTranscript
@@ -756,7 +768,7 @@ elif [ "$WHY" = "failed" ] ; then
         returnFaxImage "$RETURNFILETYPE"
     fi
 elif [ "$WHY" = "rejected" ] ; then 
-    putHeaders "$jobtag to $number failed"
+    putHeaders "$jobtag to $DESTINATION failed"
     printf " was rejected because:\n    "
     printStatus "$faxstatus"
     returnToSender
@@ -764,20 +776,20 @@ elif [ "$WHY" = "rejected" ] ; then
         returnFaxImage "$RETURNFILETYPE"
     fi
 elif [ "$WHY" = "blocked" ] ; then
-    putHeaders "$jobtag to $number blocked"
+    putHeaders "$jobtag to $DESTINATION blocked"
     printf " is delayed in the scheduling queues because:\n    "
     printStatus "$faxstatus" 
     echo ""
     echo "The job will be processed as soon as possible."
 elif [ "$WHY" = "requeued" ] ; then
-    putHeaders "$jobtag to $number requeued" 
+    putHeaders "$jobtag to $DESTINATION requeued" 
     printf " was not sent because:\n    "
     printStatus "$faxstatus" 
     echo ""
     echo "The job will be retried at $NEXT."
     returnTranscript
 elif [ "$WHY" = "removed" ] || [ "$WHY" = "killed" ] ; then 
-    putHeaders "$jobtag to $number removed from queue" 
+    putHeaders "$jobtag to $DESTINATION removed from queue" 
     echo " was deleted from the queue."
     if [ "$WHY" = "killed" ] ; then
         returnToSender
@@ -786,14 +798,14 @@ elif [ "$WHY" = "removed" ] || [ "$WHY" = "killed" ] ; then
        returnFaxImage "$RETURNFILETYPE"
     fi
 elif [ "$WHY" = "timedout" ]; then 
-    putHeaders "$jobtag to $number failed" 
+    putHeaders "$jobtag to $DESTINATION failed" 
     echo " could not be completed before the appointed deadline."
     returnToSender
     if [ -n "$RETURNFILETYPE" ] ; then
         returnFaxImage "$RETURNFILETYPE"
     fi
 elif [ "$WHY" = "format_failed" ] ; then 
-    putHeaders "$jobtag to $number failed" 
+    putHeaders "$jobtag to $DESTINATION failed" 
     echo " was not sent because document conversion"
     echo "to facsimile failed.  The output from the converter program was:"
     echo ""
@@ -802,7 +814,7 @@ elif [ "$WHY" = "format_failed" ] ; then
     echo "Check any PostScript documents for non-standard fonts and invalid constructs"
     returnToSender
 elif [ "$WHY" = "no_formatter" ] ; then 
-    putHeaders "$jobtag to $number failed" 
+    putHeaders "$jobtag to $DESTINATION failed" 
     echo " was not sent because"
     echo "the document conversion script was not found."
     returnToSender