#!/usr/local/bin/perl -w use strict; # Let's have some fun my'ing things, shall me? my %form; my $url; my $message; my $sendmail; my $subject; my $signature; my $disclaimer; my $adminmail; my $redirect; use CGI; my $query = CGI->new; print $query->redirect($redirect); %form = %{$query->Vars}; ##################### BEGIN EDITING THIS SECTION ##################### +######## $sendmail = "/var/qmail/bin/qmail-inject"; $url = 'http://secretrealmofme.hypermart.net'; $adminmail = 'admin@mail.com'; $redirect = "http://secretrealmofme.hypermart.net"; $subject = "Your $form{'friend'} thought you might be interested"; $signature = 'Your Name'; ( $message = <<"EOM" ) =~ s/^\s+//gm ; Your friend $form{'username'} recently visited our site and thought yo +u might be interested!\n\n Our site has lots of stuff! blah blah blah.\n\n Please take a look at $url and see what all the fuss was about!\n\n EOM ; ( $disclaimer = <<"EOD" ) =~ s/^\s+//gm ; <font color=red> This message was sent from your friend from $ENV{' +REMOTE_ADDR'} . We do not believe in spamming and would never do so. Your friend personally added your email address and sent this.</font> EOD ; #################### STOP EDITING FOR NOW ############################ +######### ### Make sure things are being completed, die slackers! if ($form{'username'} eq "") { print "<font color=red><li>Please click back and fill out your name!</ +font>\n"; exit; } if ($form{'email'} eq "") { print "<font color=red><li>Please click back and fill in your friend's + email address!</font>\n"; exit; } # All done, let's send the email open (MAIL, '|-', "$sendmail -t") or die("Cannot open file: $!\n"); print MAIL "To: $form{'email'}\n"; print MAIL "From: $adminmail\n"; print MAIL "Subject: $subject\n\n"; print MAIL "$message\n"; print MAIL "$disclaimer\n"; close(MAIL); # Let's give them something to look at, might as well, they were nice +enough to fill out the form! ####################### BEGIN EDITING HERE 2 ######################### +############# print <<end_of_results; # Do not alter this line! end_of_results
In reply to Re: Re: Re: Re: Redirecting Problem
by venimfrogtongue
in thread Redirecting Problem
by venimfrogtongue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |