faxrcvd_mail() { MAILTO="$2" if [ -f $FILE ]; then (echo "Mime-Version: 1.0" echo "Content-Type: Multipart/Mixed; Boundary=\"$MIMEBOUNDARY\"" echo "Content-Transfer-Encoding: 7bit" echo "To: $MAILTO" echo "From: $DICTRECEIVEAGENT <$FROMADDR>" if [ -f "$FILE" ]; then eval echo "Subject: $DICTRECEIVEDFROM"; else eval echo "Subject: $DICTNOTRECEIVED"; fi echo echo "--$MIMEBOUNDARY" echo "Content-Type: text/html; charset=UTF-8" echo "Content-Transfer-Encoding: 7bit" echo echo "" echo "" echo "" echo "" echo "" echo echo "" echo echo "
" echo " HylaFAX+ Truly, the world's most advanced open source fax server." echo "
" echo echo "
" echo "
" echo "
" echo "" echo " " echo " " echo " " echo " " echo " " echo " " echo " " echo " " faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \" echo " " faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \" echo " " faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \" echo " " faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \" echo " " echo " " faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \" echo " " echo " " faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \" echo " " echo " " echo " " echo " " echo "
\1:\<\/td>\\2\<\/td>/' | head -n 5 | tail -n 1 faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \\1:\<\/td>\\2\<\/td>/' | head -n 2 | tail -n 1 echo "
\1:\<\/td>\\2\<\/td>/' | head -n 1 | tail -n 1 faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \\1:\<\/td>\\2\<\/td>/' | head -n 3 | tail -n 1 echo "
\1:\<\/td>\\2\<\/td>/' | head -n 10 | tail -n 1 faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \\1:\<\/td>\\2\<\/td>/' | head -n 4 | tail -n 1 echo "
\1:\<\/td>\\2\<\/td>/' | head -n 11 | tail -n 1 faxInfo $FILE | sed 's/^ *\([^:]*\): \(.*\)$/ \\1:\<\/td>\\2\<\/td>/' | head -n 6 | tail -n 1 echo "
$DICTCOMMID:c$COMMID\1:\<\/td>\\2\<\/td>/' | head -n 7 | tail -n 1 echo "
$DICTRECEIVEDON:$DEVICE\1:\<\/td>\\2\<\/td>/' | head -n 8 | tail -n 1 echo "
" echo "
" echo "
" echo "
" echo "
" echo " Your fax is attached to this email in PDF format. If you have" echo " problems decoding this attachment, you may need to install a PDF" echo " viewer. A common viewer available for many operating systems is" echo " Adobe's Acrobat reader, which may be downloaded here." echo "
" echo "
" echo "
" echo "" echo "" echo "" echo "--$MIMEBOUNDARY" echo "Content-Type: application/pdf; name=\"$FILENAME.pdf\"" echo "Content-Description: FAX document" echo "Content-Transfer-Encoding: $ENCODING" echo "Content-Disposition: attachment; filename=\"$FILENAME.pdf\"" echo "" export PATH=$PATH:/usr/local/bin:/usr/local/sbin mkdir /tmp/faxrcvd-mail$$ cd /tmp/faxrcvd-mail$$ tiffsplit /var/spool/hylafax/$FILE echo $COMMID | textfmt -B > overlay.ps for PAGEFILE in *.tif; do tiff2ps $PAGEFILE | sed 's/^showpage//g' >> finaldoc.ps cat overlay.ps >> finaldoc.ps done ps2pdf finaldoc.ps finaldoc.pdf encode finaldoc.pdf cd /var/spool/hylafax $RM -rf /tmp/faxrcvd-mail$$ 2>$ERRORSTO echo "" echo "--$MIMEBOUNDARY--" ) 2>$ERRORSTO | $SENDMAIL -f$FROMADDR -oi "$MAILTO" fi }