source: npl/phone/fax2email_script/fax2email

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 1.0 KB
Line 
1#!/bin/bash
2#Copyright (C) DatuX 2009   
3#License   GPLv3:   GNU   GPL  version  3
4#<http://gnu.org/licenses/gpl.html>.
5#This is free software: you are free to change and redistribute it.  There is NO WARRANTY, to the extent permitted  by law.
6
7echo "fax2email started at: `date`"
8echo "FAXFILE=${FAXFILE} EMAILADDR=${EMAILADDR} FAXPAGES=${FAXPAGES} FAXBITRATE=${FAXBITRATE} FAXRESOLUTION=${FAXRESOLUTION} FAXSENDER=${FAXSENDER}"
9
10if [ -e "$FAXFILE" ]; then
11        echo "Fax OK, sending mail with attachment."
12        /usr/bin/sendEmail -s localhost -f "fax@`hostname -f`" -t "$EMAILADDR" -u "Fax ontvangen van $FAXSENDER" -a "$FAXFILE" -m "
13        U heeft $FAXPAGES pagina(s) ontvangen van $FAXSENDER.
14       
15        De fax is bijgevoegd als .tif file.
16        "
17else
18        echo "Fax ERROR, sending error mail."
19        /usr/bin/sendEmail -s localhost -f "fax@`hostname -f`" -t "$EMAILADDR" -u "Fax mislukt van $FAXSENDER" -m "
20        Het nummer $FAXSENDER heeft geprobeerd u een fax te sturen, maar dit is mislukt.
21       
22        Deze mail is puur ter informatie. De afzender moet de fax opnieuw versturen.
23        "
24fi
25
Note: See TracBrowser for help on using the repository browser.