Hylafax Mailing List Archives

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

Re: [hylafax-users] faxrcvd => Fax send per Mime E-Mail



>
>Hello,
>
>I try to send incoming Fax as an mime-codet tif File per E-Mail.
>So i changed bin/faxrcvd to:
>
>--cut
>         echo ""
>         echo "--$MIMEBOUNDARY"
>         echo ""
>         echo "Content-Type: application/octet-stream; name=Fax.tif"
>         echo "Content-Transfer-Encoding: base64"
>         echo "Content-Disposition: attachment; name=fax.tif"
>         echo""
>        $FAX2PS $FAX Fax.tif 2>/dev/nul
>         echo ""
>         echo "--$MIMEBOUNDARY--"
>
>--cut
>
>where 
>FAX2PS="/usr/bin/uuencode -m"
>
>But i dosn't work.
>Can anybody tell my why ? (Im a beginner to understand the mime encoding
>!)
>
>Thanks
>Thomas


Hi,

	the problem is that you specified base64 encoding but fax2tif output
	is not encoded.
	
	I use a little Perl script to make this conversion. I think there is
	a better way to do it, but this work.


Bye

Miguel Sanz

faxrcvd:
         echo "--$MIMEBOUNDARY"
         echo "Content-Type: image/tiff; name=$FILE"
         echo "Content-Description: FAX document"
         echo "Content-Transfer-Encoding: base64"
         echo ""
         bin/base64 $FILE
         echo ""
         echo "--$MIMEBOUNDARY--"

base64 script:

#!/usr/bin/perl

use MIME::Base64 qw(encode_base64);

open(FILE, $ARGV[0]) or die "$!";
   while (read(FILE, $buf, 60*57)) {
print encode_base64($buf);


______________________________________
Miguel Sanz Loste
Autek Ingeniería, S.L.
Tel 91 597 46 29
Fax 91 597 20 67
Capitán Haya 23, esc. 1, 4-7
E-28020 Madrid


Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services