> Hey Bernard--
I'm no guru, but I think I can help you with this one...
when you're sending the e-mail to the recipient, the link that it
generates (in this case,
http://www.aestheticsurgerycenter.co....cgi1070022045) is
missing a separator for the query string (the 1070022045 part). Find the
portion of the script that puts the message together and add a
question mark between the .cgi and the following varible, and it should
work!
hope that helps!
no_guru
Here's the code, I have no experience with Perl. So, maybe can you see which
part of the script puts the message together.
#!D:/Program Files/Perl/bin/perl.exe
############### ############### ############### ###########
############### ############### ############### ###########
# Don't Edit This CGI Part #
############### ############### ############### ###########
############### ############### ############### ###########
$i=0;
read(STDIN,$buf fer,$ENV{'CONTE NT_LENGTH'});
if ($ENV{'QUERY_ST RING'})
{$buffer = "$buffer\&$ENV{ 'QUERY_STRING'} ";}
@pairs = split(/&/,$buffer);
foreach $pair (@pairs){
($name,$value) = split(/=/,$pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1 ))/eg;
$VALUE{$name} = $value;
}
############### ############### ##############
#Gets the Current Date
############### ############### ##############
($sec,$min,$hr, $day,$month,$ye ar,$day_of_week ,$day_of_year,$ some) =
localtime(time) ;
@months =
("January","Feb ruary","March", "April","May"," June","July","A ugust","Septemb e
r","October","N ovember","Decem ber");
$year = $year + 1900;
$DATE = "$months[$month]-$day";
$SHORTDATE = "$months[$month] $day, $year at $hr:$min:$sec";
############### ############### ##############
#Gets Picture Data and Moves on to Next Page
############### ############### ##############
if ($VALUE{'action '} eq 'preview') {
$pic = $VALUE{'PICTURE S'};
$VALUE{'PICTURE '} = $VALUE{'PICTURE S'};
$VALUE{'PICTURE S'} = "$basepicurl$pi c";
print "Content-type: text/html\n\n";
open(TEMPLATE," $preview1");
&template;
print $template;
exit;
}
############### ##########
#Prints the Preview Page
############### ##########
if ($VALUE{'action '} eq 'preview1') {
$pic = $VALUE{'PICTURE '};
$VALUE{'PICTURE S'} = "$basepicurl$pi c";
$VALUE{'MESSAGE '} =~ s/\r//g;
$VALUE{'MESSAGE '} =~ s/\<[^\>]*\>//ig;
$VALUE{'MESSAGE '} =~ s/"/'/g;
$VALUE{'MESSAGE '} =~ s/\n/<BR>/g;
print "Content-type: text/html\n\n";
open(TEMPLATE," $preview2");
&template;
print $template;
exit;
}
##########
#Send Card
##########
if ($VALUE{'action '} eq 'send') {
&no_email unless $VALUE{'MAILFRO M'} && $VALUE{'MAILTO' };
############### #######
#Save the Data
############### #######
$date = time;
$create_card = "$cards$date.da t";
open(DATA, ">>$create_card ");
print DATA
"$VALUE{'SENDER '}|$VALUE{'MAIL FROM'}|$VALUE{' RECIPIENT'}|$VA LUE{'MAILTO'}|$ V
ALUE{'MESSAGE'} |$VALUE{'PICTUR E'}|0\n";
close(DATA);
$url_of_card = "$cgi?$date ";
############### ###########
#Print Thank You HTML
############### ###########
print "Content-type: text/html\n\n";
open(TEMPLATE," $thank_you");
&template;
print $template;
$template = '';
############### ###########
#Send E-mail to Recipient
############### ###########
open (MAIL, "|$mailprog -t") || die "Kan $mailprog niet openen!\n";
print MAIL "To: $VALUE{'MAILTO' } ($VALUE{'RECIPI ENT'})\n";
print MAIL "From: $VALUE{'MAILFRO M'} ($VALUE{'SENDER '})\n";
print MAIL "Subject: $VALUE{'RECIPIE NT'}, $subject1\n\n";
open(TEMPLATE," $email1");
&template;
print MAIL $template;
print MAIL ".\n" ;
close(MAIL);
$deletes = "$cards$DATE.da t";
if(-e $deletes){
}
else{
open(DATA, ">>$deletes ");
close(DATA);
&delete;
}
exit;
}
############### #########
#No E-Mail Addresses
############### #########
sub no_email {
print "Content-type: text/html\n\n";
print "<HTML>\n<TITLE >Fout! E-Mail adres niet geldig</TITLE>\n";
print "<BODY COLOR=\"#FFFFFF \">\n";
print "Kan niet verstuurd worden!<BR>\n";
print "<B>[Mogelijke oorzaken:]</B><BR>\n";
print " 1. ) U bent beide e-mail adressen vergeten in te
vullen<BR>";
print " 2. ) E-Mail Adres(en) niet in de goed formaat ingetypt,
<B>b.v.
na**@bedrijf.co m</B>";
exit;
}
############### ############### #########
#Creates the Postcard
############### ############### #########
if ($ENV{'QUERY_ST RING'}) {
############### ############### ##############
#Makes Postcards and Sends Thank You E-mail
############### ############### ##############
$create_card = "$cards$ENV{'QU ERY_STRING'}.da t";
if(-e $create_card){
open(DATA, "$create_card") ;
@data = <DATA>;
close(DATA);
foreach $temp (@data){
chop($temp);
($SENDER, $MAILFROM, $RECIPIENT, $MAILTO, $MESSAGE, $PICTURES, $COUNT) =
split(/\|/, $temp);
$VALUE{'SENDER' } = $SENDER;
$VALUE{'MAILFRO M'} = $MAILFROM;
$VALUE{'RECIPIE NT'} = $RECIPIENT;
$VALUE{'MAILTO' } = $MAILTO;
$VALUE{'MESSAGE '} = $MESSAGE;
$VALUE{'MESSAGE '} =~ s/ / /g;
$VALUE{'PICTURE S'} = "$basepicurl$PI CTURES";
$VALUE{'LINK'} = "$link$LINK ";
$VALUE{'PICTURE '} = "$basepicurl$PI CTURES";
}
unlink("$create _card");
open(DATA, ">>$create_card ");
$COUNT++;
print DATA
"$SENDER|$MAILF ROM|$RECIPIENT| $MAILTO|$MESSAG E|$PICTURES|$CO UNT\n";
close(DATA);
print "Content-type: text/html\n\n";
open(TEMPLATE," $makecard");
&template;
print $template;
$template = '';
if($COUNT eq '1'){
open (MAIL, "|$mailprog -t") || die "Kan $mailprog niet openen!\n";
print MAIL "To: $VALUE{'MAILFRO M'} ($VALUE{'SENDER '})\n";
print MAIL "From: $VALUE{'MAILTO' } ($VALUE{'RECIPI ENT'})\n";
print MAIL "Subject: $subject2\n\n";
open(TEMPLATE," $email2");
&template;
print MAIL $template;
print MAIL ".\n" ;
close(MAIL);
}
}
else {
print "Content-type: text/html\n\n";
open(TEMPLATE," $error");
&template;
print $template;
}
exit;
}
############### ############### #########
#DELETES the information
############### ############### #########
sub delete {
local(@items, $pair);
opendir(DELETE, "$cards");
@items = grep(/.dat/,readdir(DELETE ));
closedir(DELETE );
foreach $pair (@items){
if (-M "$cards$pai r" > $MAX_DAYS){
unlink("$cards$ pair");
}
}
}
############### ######
#Calls the Template
############### ######
sub template {
while (<TEMPLATE>){
$template .= $_;
}
close(TEMPLATE) ;
$template =~ s/\%%%PICTURES%%%/$VALUE{'PICTURE S'}/g;
$template =~ s/\%%%PICTURE%%%/$VALUE{'PICTURE '}/g;
$template =~ s/\%%%SENDER%%%/$VALUE{'SENDER' }/g;
$template =~ s/\%%%MAILFROM%%%/$VALUE{'MAILFRO M'}/g;
$template =~ s/\%%%MAILTO%%%/$VALUE{'MAILTO' }/g;
$template =~ s/\%%%RECIPIENT%% %/$VALUE{'RECIPIE NT'}/g;
$template =~ s/\%%%MESSAGE%%%/$VALUE{'MESSAGE '}/g;
$template =~ s/\%%%CGI%%%/$cgi/g;
$template =~ s/\%%%MAX_DAYS%%%/$MAX_DAYS/g;
$template =~ s/\%%%SHORTDATE%% %/$SHORTDATE/g;
$template =~ s/\%%%url_of_card %%%/$url_of_card/g;
}
Thx,
Bernard