[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Globalsub and file handles
****** message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com> ******
Hey list, how's everyone this glorious Wednesday?
I'm rather clueless with Globalsubs, and I'm having difficulty with this:
GlobalSub <<EOF
sub ezineresponse {
my $user_email = @_;
open (MAIL, "|/usr/bin/sendmail -t") || die "Can't open sendmail!\n";
print MAIL "From: ezine\@gyb.baits.com\n";
print MAIL "To: $user_email\n";
open(WELCOME, "< /var/lib/httpd/htdocs/insider/ezine/subscribe-or.txt")
or die "Could not open subscribe-or.txt: $!\n";
my @welcome = <WELCOME>;
close (WELCOME);
foreach my $line (@welcome) {
print MAIL "$line";
}
close (MAIL);
}
EOF
called with [perl sub]ezineresponse foo@bar.com[/perl] from the report page...
returning zero error messages and zero e-mails.
The code is designed to send a confirmation e-mail to a customer who
checked a box requesting to be added to a mailing list.
Sorry if I'm missing something obvious, I'm running on empty. I'd
appreciate any tips.
Thanks in advance,
-Ryan
Ryan Hertz tel 800-645-BAIT
Webmaster fax 520-645-2588
Advertising Director http://yamamoto.baits.com
Gary Yamamoto Custom Baits, Inc. http://www.insideline.net
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list