]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Bug 176: add CHARSET support for notification e-mails
authorLee Howard <faxguy@howardsilvan.com>
Tue, 21 Feb 2006 17:45:13 +0000 (17:45 +0000)
committerLee Howard <faxguy@howardsilvan.com>
Tue, 21 Feb 2006 17:45:13 +0000 (17:45 +0000)
CHANGES
configure
etc/faxsetup.sh.in
util/faxrcvd.sh.in
util/notify.sh.in
util/pollrcvd.sh.in

diff --git a/CHANGES b/CHANGES
index 481145410b6710856336bebdc4f555b4cae527d2..3a2fa991c84e29cacb85a699b47ddf242dd118af 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
 
 Changelog
 
+* add CHARSET config option for mailing scripts (21 Feb 2006)
 * 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)
index 26f5579cd453ee0bc5eb926764ae59fdaa97159f..a12717a519b9cc598594fea49dfd4634f0e13939 100755 (executable)
--- a/configure
+++ b/configure
@@ -119,6 +119,7 @@ CHMOD
 CHOWN
 CC
 CCOMPILER
+CHARSET
 CMP
 COL
 CP
@@ -294,6 +295,15 @@ test -d /usr/local/bin && PATH=/usr/local/bin:$PATH        # for GNU stuff
 PATH=$PATH:$OPATH
 
 POSIXLY_CORRECT=1; export POSIXLY_CORRECT              # disable GNU extensions
+
+#
+# Check for locale settings before setting LC_ALL.
+#
+CHARSET=`(locale -c LC_MESSAGES | tail -n 1)`
+if test X$CHARSET = X; then
+    CHARSET=us-ascii
+fi
+
 LC_ALL=C; export LC_ALL                                        # set a common language
 
 #
index 51bb81b13f7699a1fb304942bd0d7d5df663b09e..e8c21cd096e5caddecb428618eee73dcc9f71353 100644 (file)
@@ -50,6 +50,7 @@ test -d /usr/local/bin && PATH=$PATH:/usr/local/bin   # for GNU tools
 
 AWK=@AWK@                      # awk for use below
 CAT=@CAT@                      # cat command for use below
+CHARSET=@CHARSET@              # character set to use in e-mails
 CHGRP=@CHGRP@                  # change file group for use below
 CHMOD=@CHMOD@                  # change file mode for use below
 CHOWN=@CHOWN@                  # change file owner for use below
@@ -130,6 +131,7 @@ FONTPATH            PATH_AFM
 AWK
 BIN            DIR_BIN
 CAT
+CHARSET
 CHGRP
 CHMOD
 CHOWN
index 5944bd0ba83e5673c6eaeb82925fdba69fbdfbc4..7fa5e8419ba679a32eaf8969b9e6971637c7c3d7 100644 (file)
@@ -57,6 +57,7 @@ ENCODING=base64
 MIMENCODE=mimencode
 TIFF2PDF=bin/tiff2pdf
 TTYCMD=tty
+CHARSET=us-ascii
 
 . etc/setup.cache
 
@@ -155,7 +156,10 @@ if [ -f $FILE ]; then
        *)              NOTIFY_FAXMASTER=yes;;
     esac
     if [ "$TOADDR" != "$SENDTO" -a "$NOTIFY_FAXMASTER" != "no" ]; then
-       (echo "To: $TOADDR"
+       (echo "Mime-Version: 1.0"
+        echo "Content-Type: text/plain; charset=$CHARSET"
+        echo "Content-Transfer-Encoding: quoted-printable"
+        echo "To: $TOADDR"
         echo "From: The HylaFAX Receive Agent <$FROMADDR>"
         echo "Subject: Facsimile received from $SENDER";
         echo ""
@@ -197,8 +201,8 @@ if [ -f $FILE ]; then
         echo "Subject: Facsimile received from $SENDER";
         echo ""
         echo "--$MIMEBOUNDARY"
-        echo "Content-Type: text/plain; charset=us-ascii"
-        echo "Content-Transfer-Encoding: 7bit"
+        echo "Content-Type: text/plain; charset=$CHARSET"
+        echo "Content-Transfer-Encoding: quoted-printable"
         echo ""
         $INFO -n $FILE
         echo "ReceivedOn: $DEVICE"
index dc3b9b4f995d4689fda87f3c1920f263673e7a89..1a6d232f1e64888f6b21debfed00db7dead2907f 100644 (file)
@@ -70,6 +70,7 @@ ENCODING=base64
 MIMENCODE=mimencode
 TIFF2PDF=bin/tiff2pdf
 TTYCMD=tty
+CHARSET=us-ascii
 
 . etc/setup.cache
 
@@ -436,8 +437,8 @@ putMimeTextHeader()
     echo "This is a multi-part message in MIME format."
     echo ""
     echo "--$MIMEBOUNDARY"
-    echo "Content-Type: text/plain; charset=us-ascii"
-    echo "Content-Transfer-Encoding: 7bit"
+    echo "Content-Type: text/plain; charset=$CHARSET"
+    echo "Content-Transfer-Encoding: quoted-printable"
     echo ""
 }
 
index 6f64b28fefd158f83e9687813b9e64967690a9a1..ce4ab04d79927db9d3d61d42cce95208edbad8ba 100644 (file)
@@ -58,6 +58,7 @@ ENCODING=base64
 MIMENCODE=mimencode
 TIFF2PDF=bin/tiff2pdf
 TTYCMD=tty
+CHARSET=us-ascii
 
 . etc/setup.cache
 
@@ -175,8 +176,8 @@ if [ -f $FILE ]; then
         echo "Subject: Facsimile retrieved from $SENDER";   
         echo ""
         echo "--$MIMEBOUNDARY"
-        echo "Content-Type: text/plain; charset=us-ascii"
-        echo "Content-Transfer-Encoding: 7bit"
+        echo "Content-Type: text/plain; charset=$CHARSET"
+        echo "Content-Transfer-Encoding: quoted-printable"
         echo ""
         echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):"; $INFO -n $FILE
         echo "ReceivedOn: $DEVICE"