From your displayed fill in form (with the fields you list as hidden above) you use the form "action" of the Perl script you want to run (i.e. action='/cgi-bin/mailer.pl')
Use the CGI module to retrieve the form fields, build the message you want to send then use Net::SMTP or Mail::Mailer to actually send it on it's way.