print "Content-type: text/html; charset=utf-8\n\n";
use strict;
use CGI qw(:standard Vars);
my %form = Vars;
print <<"EOF";
Contact us
EOF
my ($err_content,$err_contact);
if (%form) {
if (!$form{content}) {
$err_content="Please write something
";
} elsif (!$form{contact}) {
$err_contact="Please write how to contact you
";
} else {
open SENDMAIL, "|/usr/local/sbin/sendmail -f brinkstudio\@gmail.com donate\@pimtel.com" or die "cannot send mail";
print SENDMAIL <Successfully sent. Please wait for reply in 1-3 days";
goto END
}
}
print <<"EOF";
Contact
EOF
END:
print <<"EOF";
EOF