in reply to SendMail won't send mail

Not commenting on your sendmail problem, but I saw this glaring issue and had to perk up:
if (-e $FORM{'template'}) { } else { &Error('Template File Not Found - Error at sendmail subscript') +; } open (FILE, $FORM{'template'});
What's to stop someone from sending C</etc/passwd> as your template? Or even worse, playing games with NULs, which terminate C's scan on the -e test, but not Perl's scan on the open!

Get that scary code out of your CGI at once.

-- Randal L. Schwartz, Perl hacker