HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: send to email as a tiff?



> From:	Matt Kaminer [SMTP:matt@mmc.net]
	On  Thursday, March 11, 1999 11:14 PM Mat Kaminer wrot:

	> Using 4.0pl2 on a redhat 5.2 server.
	> 
	> Can someone tell me how to send the tiff image instead of the >
postscript
	> file to an email address?  
	> 
	> I want to have one person receive the faxes and distribute them.
I
	> figured it would be easier to have tiff images emailed so they can
view
	> the file on the desktop.  Im not sure how to view a postscript
file!

	In faxrcvd make these changes where it is MIME attaching the
postscript file

    if [ -n "$SENDTO" ]; then
	(MIMEBOUNDARY="NextPart$$"
	 echo "Mime-Version: 1.0"
	 echo "Content-Type: Multipart/Mixed; Boundary=\"$MIMEBOUNDARY\""
	 echo "Content-Transfer-Encoding: 7bit"
	 echo "To: $SENDTO"
	 echo "From: The HylaFAX Receive Agent <fax>"
	 echo "Subject: facsimile received from $SENDER";
	 echo ""
	 echo "--$MIMEBOUNDARY"
	 echo "Content-Type: text/plain; charset=us-ascii"
	 echo "Content-Transfer-Encoding: 7bit"
	 echo ""
	 echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):"; $INFO -n $FILE
	 echo "ReceivedOn: $DEVICE"
	 if [ "$MSG" ]; then
	    echo ""
	    echo "The full document was not received because:"
	    echo ""
	    echo "    $MSG"
	    echo ""
	    echo "    ---- Transcript of session follows ----"
	    echo ""
	    if [ -f log/c$COMMID ]; then
		$SED -e '/-- data/d' \
		     -e '/start.*timer/d' -e '/stop.*timer/d' \
		     log/c$COMMID
	    elif [ -n "$COMMID" ]; then
		echo "    No transcript available (CommID c$COMMID)."
	    else
		echo "    No transcript available."
	    fi
	 else
	    echo "CommID:     c$COMMID (ftp://$HOSTNAME:$PORT/log/c$COMMID)"
	 fi
	 echo ""
	 echo "--$MIMEBOUNDARY"
 	 echo "Content-Type: application/fax; name=${FILE#$RECVQ}"
	 echo "Content-Description: FAX document"
 	 echo "Content-Transfer-Encoding: base64"
	 echo ""
 	 $MIMENCODE $FILE
	 echo ""
	 echo "--$MIMEBOUNDARY--"
	) | 2>&1 $SENDMAIL -ffax -oi $SENDTO

	at the top define

	MIMENCODE=/usr/bin/mimencode

	mimencode is widely available (I forget where I found it)

	This properly includes the tiff file as a MIME attachment in the
mail message.

	Then any e.g Windows client can open it with the Windows Imaging
program that comes bundled in accessories.

Rob Embry
EMC Test Systems
Austin, TX






Project hosted by iFAX Solutions