in reply to contact form not mailing (urgent!)

I know that this is likely outside of your scope, but you should retire this CGI script as soon as possible. It contains a flaw that makes it trivially easy to send spam via your mail address to any address, because you do not check that your input parameters are well-formed. Especially, no parameter should be allowed to contain a newline (\n) character.

As for your error tracking, try looking into the sendmail logfiles wherever they are, and make sure that sending mail works from the command line before trying to use it from within the webserver. You can also print out the mail into a text file and later manually pipe the text file into sendmail to see the error messages.

You can of course also look at what the NMS Formmail Script has to offer.

Replies are listed 'Best First'.
Re^2: contact form not mailing (urgent!)
by coldfingertips (Pilgrim) on Jul 07, 2005 at 21:26 UTC
    Sendmail works just fine on my server. There are a number of other forms that are working. I do know this isn't secure yet but once the error is fixed, I'll begin tweaking the rest of it.

    Forgot to mention this.. This form is being sent data via POST from another web site completely. Does this matter at all? I doubt it makes any difference, but just thought I'd ask.

      I know this is a tough situation for you. Please take five minutes to step back from the problem at hand and relax.

      intermission

      Welcome back.

      Did you follow the steps that I outlined? Especially the step of redirecting the output into a file and then piping the file to sendmail, to see the error message(s)? My guess is, that you are not delimiting the email headers from the email message with an empty line as is customary. But that is just a guess since I am a long time user of MIME::Lite which takes care of these pesky details for me. So please, do follow the outlined steps for debugging, as it will make the job easier, now and in the future, for you and me.

        I thank you for your help.

        I thought it might be because there's no space after Subject: in the email line, but that wasn't it. So I sat there comparing all my working scripts to this one and it finally dawned on me. I wasn't -t on sendmail.

        The minute I noticed this I was 90% sure this was the problem.. sure enough, adding this to both emails fixed the problem and the emails are working just fine! I hate moving files from one server to the next, they never seem to work right away :)

        Thanks for your help.