Date: Wed, 10 Apr 2002 15:20:20 -0500 From: "Justin L. Boss" <jlboss@yahoo.com> To: questions@freebsd.org Subject: perl script Message-ID: <3CB49E84.3050403@yahoo.com>
next in thread | raw e-mail | index | archive | help
this perl script is linux, i do not know if it is difrent from freebsd i though perl cross platform. this is the error i get: Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 32. Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 32. Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 70. Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 70. Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 70. Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 70. Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 70. Use of uninitialized value at /var/spool/hylafax/bin/faxrcvd-mail line 70. Can't exec "minencode": No such file or directory at /var/spool/hylafax/bin/faxrcvd-mail line 80. minencode:/var/spool/hylafax/bin/faxrcvd-mail line 82. i don't know what minencode is and at line 32 and 70 are 'print <<EOF' i put a space in (print << EOF) just got difrent errors this suck big, the guy was using linux and this was working fine for him. i convenst him to move to freebsd and i have worked on this for two days strate. thanks for you help. #! /usr/bin/perl -w # # /var/spool/hylafax/bin/faxrcvd-mail # Noel Burton-Krahn <noel@burton-krahn.com> # Sept 4, 1999 # # a replacement for hylafax's faxrcvd which sends the whole fax by email use strict; my($file, $device, $commid, $msg, $toaddr, $fromaddr, $tiffile) = @ARGV; #open(STDOUT, "|send -oi -f fax $toaddr"); my(%info, $info); my($boundary); $boundary=join('---', "=Boundary=", $$, sprintf('%x', rand(0xffffffff))); open(IN, "/usr/local/sbin/faxinfo $file|") || die("/usr/local/sbin/faxinfo $file: $!"); while(<IN>) { $info .= $_; $info{lc($1)} = $2 if( /^\s*(\S+): (.*)$/ ); } close(IN) || die("/usr/local/sbin/faxinfo: $?"); print <<EOF From: HylaFAX Server < $fromaddr > To: $toaddr Subject: FAX from $info{sender} at $info{received} Mime-Version: 1.0 Content-Type: Multipart/Mixed; Boundary=\"$boundary\" Content-Transfer-Encoding: 7bit This is a multi-part message in MIME format. --$boundary #Content-Type: text/plain; charset=us-ascii #Content-Description: FAX information #Content-Transfer-Encoding: 7bit #$info EOF ; if( $msg ne "" ) { print <<EOF The full document was not received because: $msg EOF ; } if( open(IN, "<log/c$commid") ) { print << EOF ---- Transcript of session follows ---- EOF ; print while(<IN>); close(IN); } print <<EOF --$boundary Content-Type: application/tif; name="FAX from $info{sender} at $info{received}.tif" Content-Description: FAX from $info{sender} at $info{received} Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="FAX from $info{sender} at $info{received}.tif" EOF ; open(IN, "mimencode $tiffile |") || die ("couldn't mimencode $tiffile: $!"); print while(<IN>); close(IN) || die("mimencode: $?"); print <<EOF --$boundary-- EOF _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CB49E84.3050403>