note 60863 deleted from ref.mail by betz

From: Date: Wed, 18 Jan 2006 19:53:36 +0000
Subject: note 60863 deleted from ref.mail by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-102056@lists.php.net to get a copy of this message
Note Submitter: joris at ideeel dot nl ---- As the wrapper script is the only solution on an ISP level, but not every distro ships with PHP CLI enabled, here is a similar wrapper script in perl (written by Henk vd Toorn) #!/usr/bin/perl use strict; use warnings; use Digest::MD5 qw(md5_hex); my @input = <STDIN>; my $file = join "", @input; my $tmpfile = "/tmp/php_mail/temp".md5_hex($file).".mail"; open(TMP, ">$tmpfile") or die "Could not open $tmpfile\n"; $file =~ s/^bcc:/x-wlsspam-bcc:/img; $file =~ s/^cc:/x-wlsspam-cc:/img; print TMP $file; print $file; close(TMP); my $cmd = '/usr/sbin/sendmail -t -i '; $cmd .= join " ", @ARGV; $cmd .= "<$tmpfile"; $cmd; unlink ($tmpfile);

« previous php.notes (#102056) next »