Menu

Form not working

Help
2008-12-15
2013-06-03
  • Wayne Clements

    Wayne Clements - 2008-12-15

    I've tried, and tried and tried and am still not able to get my form to work.  I've even tried a simple test form with one field and am still not getting an email sent from the form.  Does anyone have any ideas?  I'd be happy to supply the code but perhaps I'm missing something easy.  Any help would be greatly appreciated!  Thanks.

    Wayne

     
    • Dave H

      Dave H - 2008-12-15

      Hi Wayne,
      First of all, can you send a message to the email account from the command line? If your form is on a linux box try this from the command line.

      # date > testfile
      # mail -s "test email" email@servername < testfile

      If you don't receive the email, it is a server problem, not the form. Make sure to check your spam and trash folders.

      Dave

       
    • Wayne Clements

      Wayne Clements - 2008-12-15

      I'm not familiar with linux.  My processor file is as follows:

      <?php

      $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));

      mail("wayne@innerspacestorage.com","phpFormGenerator - Form submission","Form data:

      Name: " . $_POST['field_1'] . "

      powered by phpFormGenerator.
      ");

      include("confirm.html");

      ?>

       
    • Wayne Clements

      Wayne Clements - 2008-12-15

      My form is now working thanks to the tech support from my hosting provider.  I've included their reply below in case someone else out there is experiencing the same thing:

      As you are on windows server you should specify envelop mail sender in your script with ini_set() function. I have added the following line to your mail scripts:
      ini_set("sendmail_from","webmaster@".$_SERVER["SERVER_NAME"]);
      and now your form is working properly.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.