in reply to Hand Rolled CGI/Sendmail

Can you print the information you get from the user? That should tell you whether the problem is the email, or getting the data from the user.

Also, checking for a failure of new CGI and the open and close of MAIL might tell you what's going wrong.

Replies are listed 'Best First'.
Re: Re: Hand Rolled CGI/Sendmail
by Lost (Novice) on May 07, 2004 at 19:42 UTC
    I can't print any of the info obtained from the user. The HTML form accepts the input, the "Submit" button works, an email is sent to my clients Inbox, but when the email is open, the field titles (i.e.-Name:, Address:, etc) are there but none of the text the user inputs into the text fields are printed into the email.
    Can you refresh me on how to check for failure of the Open,Close, and new CGI
      You can't print user input to either the mail message or in the response HTML page? Are you sure you're getting the information, then? Try printing $query->Dump somewhere and see if the CGI object has in it what you expect.

      As for error checking, using or die "error..." should do the trick:

      my $query = new CGI or die "Couldn't create CGI object!\n"; open(MAIL, "|/usr/sbin/sendmail -t") or die "Couldn't start sendmail: $!\n"; close(MAIL) or die "Error closing sendmail: $!, exit status $?\n";
        Thank you so much for your time and wisdom...I'll give it a try!
        It still does not have the user entered text; and when I check open, close, the script still runs, (again no user entered text) and the same errors come up in my log file as before.
        For some strange reason the personal info requested is still not being sent. ARRGGHH.
        Could there be an issue on the server side as this is being run through an ssl for my client's visitors safety.