Menu

Form not being e-mail

Help
snorider
2005-11-20
2013-06-03
  • snorider

    snorider - 2005-11-20

    I've finally got everything working EXCEPT the form will not e-mail - posts to the index.php database fine but no e-mail. I've included a snippet from process.php:

    $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    $message="FirstName: ".$FirstName."
    LastName: ".$LastName."
    Address1: ".$Address1."
    Address2: ".$Address2."
    City: ".$City."
    PostalCode: ".$PostalCode."
    ProvState: ".$ProvState."
    Country: ".$Country."
    Phone1: ".$Phone1."
    Phone2: ".$Phone2."
    Email: ".$Email."
    VIN1: ".$VIN1."
    VIN2: ".$VIN2."
    VIN3: ".$VIN3."
    Signature: ".$Signature."
    OFSCMailings: ".$OFSCMailings."
    OFSCFirstName: ".$OFSCFirstName."
    OFSCLastName: ".$OFSCLastName."
    OFSCAddress1: ".$OFSCAddress1."
    OFSCAddress2: ".$OFSCAddress2."
    OFSCCity: ".$OFSCCity."
    OFSCPostalCode: ".$OFSCPostalCode."
    OFSCProvState: ".$OFSCProvState."
    OFSCCountry: ".$OFSCCountry."
    OFSCPhone1: ".$OFSCPhone1."
    OFSCPhone2: ".$OFSCPhone2."
    OFSCEmail: ".$OFSCEmail."
    OFSCSignature: ".$OFSCSignature."
    Payment: ".$Payment."
    ";
    $message = stripslashes($message);
    mail("emailaddress@isp.ca","Form Submitted at your website",$message,"From: phpFormGenerator");

    $make=fopen("admin/data.dat","a");
    $to_put="";
    $to_put="";
    $to_put .= $FirstName."|".$LastName."|".$Address1."|".$Address2."|".$City."|".$PostalCode."|".$ProvState."|".$Country."|".$Phone1."|".$Phone2."|".$Email."|".$VIN1."|".$VIN2."|".$VIN3."|".$Signature."|".$OFSCMailings."|".$OFSCFirstName."|".$OFSCLastName."|".$OFSCAddress1."|".$OFSCAddress2."|".$OFSCCity."|".$OFSCPostalCode."|".$OFSCProvState."|".$OFSCCountry."|".$OFSCPhone1."|".$OFSCPhone2."|".$OFSCEmail."|".$OFSCSignature."|".$Payment."
    ";
    fwrite($make,$to_put);
    ?>

    I've also been trying to get the following to work to add a thank you e-mail - if I add this, process.php does nothing:

    /*Adding thankyou code here*/

    $message="Thank you for ordering your 2006 Snowmobile trail passes from the Wawa Snoriders.  Your permits will be mailed as soon as payment as been received and should arrive 10-14 days after that.";
    mail($Email,"Wawasnoriders",$message,"From: info@wawasnoriders.com");
    />
    /*End of thank you code*/

    Your help is greatly appreciated!  Seems i'm making progress but just as one thing works I seem to go and mess up others.

    Thanks!

     
    • TNTEverett

      TNTEverett - 2005-11-21

      Using this small test file to send an email.  Put this one your site, point your browser to it and wait for the email.  If it does not work for you then you will have to check with your host to see why you can not send email using this method. 
      It works from my site.

      <?php
      mail("youremail@yourdomain.com","Wawasnoriders","Hello!","From: info@wawasnoriders.com");
      ?>

       
    • snorider

      snorider - 2005-11-21

      No message - must be my host.  I'll send them a message and see what's up.
      Thank you for your quick response!!

      I can't wait to see this all working, i've been inspired to learn a whole lot more about php and formgenerator - great stuff!

       

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.