http://qs321.pair.com?node_id=82747

belize has asked for the wisdom of the Perl Monks concerning the following question:

I have a simple CGI that takes a form and sends an email with the contents of the form.

Everything appears to work fine and the success page shows (which should only show if the CGI correctly makes it through all the other sub routines).

Problem is that no email is being sent. I know I should be using CGI.pm, but the current CGI has always worked in the past, and is already in place with the forms and all.

Is there a way to test if SendMail is working? I have:

1. Looked for and not found any dead.letter file
2. Looked in the error logs (nothing)
3. Used the following code:

sub SendMail { if (-e $FORM{'template'}) { } else { &Error('Template File Not Found - Error at sendmail subscript') +; } open (FILE, $FORM{'template'}); @File = <FILE>; close (FILE); open (MAIL, "|$mailprog -t") || &Error('Unable to Open Sendmail'); . . . }

but no error shows up which makes me think that SendMail is opening.

I've checked the SMTP service on the host servers and they are running.

I'm running out of things to check. Any ideas?