I'm a programmer at heart, so I overcomplicate everything. We store all the responses using PGP into a database table, then call them back up when an employee asks for a particular submission.
The script you're using has a redirect value available. It doesn't seem to be able to store files, though.
Basically, you'd need to do something like the following:
Edit the following subroutine:
Code:
sub send_main_email_fields {
my ($self) = @_;
my $filename = time() . $$;
open (DUMPFILE, "> /full/path/to/protected/directory/$filename.html");
foreach my $f (@{ $self->{Field_Order} }) {
my $val = (defined $self->{Form}{$f} ? $self->{Form}{$f} : '');
$self->send_main_email_field($f, $val);
}
$self->mailer->print("New submission at https://www.servername.com/protected/directory/$filename.html" . $nl);
close (DUMPFILE);
}
And edit this subroutine as follows:
Code:
sub send_main_email_field {
my ($self, $name, $value) = @_;
my ($prefix, $line) = $self->build_main_email_field($name, $value);
my $nl = ($self->{CFG}{double_spacing} ? "\n\n" : "\n");
if ($self->{CFG}{wrap_text} and length("$prefix$line") > $self->email_wrap_columns) {
print DUMPFILE qq( $self->wrap_field_for_email($prefix, $line) . $nl );
}
else {
print DUMPFILE qq("$prefix$line$nl");
}
}
Finally, add a .htaccess and a .htpasswd file and you'd be set.
Please note: I didn't test any of this code, so consider it a rough draft. It should be fairly close, if not working, after making these changes. As ALWAYS, be sure to make a backup of any scripts before working on them, and set them in a test environment (make a test submission page and name the script something else) to work on before making any real changes.
Brian.