Menu

email results to different email

Help
W4Designs
2009-03-19
2013-06-03
  • W4Designs

    W4Designs - 2009-03-19

    Is there a way to make it so the form results are emailed to a certain email address based on a selection in the form?

    In other words, if a questions says " are you a new applicant or a returning applicant". If they choose "new applicant" it goes to one recipient. But if they choose "returning applicant", it goes to a different recipient.

    Thanks!

     
    • Musawir Ali

      Musawir Ali - 2009-03-19

      You need to manually edit your generated code in order accomplish this.

      On a side note, this question comes quite often. Perhaps we should add this as a special case feature in future versions.

       
      • W4Designs

        W4Designs - 2009-03-19

        I figured I would have to modify the code. how would I do that?

         
      • W4Designs

        W4Designs - 2009-03-20

        I figured I would have to modify the code. how would I do that?

         
        • TNTEverett

          TNTEverett - 2009-03-22

          Based on your first post.

          "In other words, if a questions says " are you a new applicant or a returning applicant". If they choose "new applicant" it goes to one recipient. But if they choose "returning applicant", it goes to a different recipient. "

          Modify your processor.php file according to this example:

          Code to add:
          if($returning_field){
          $sendto="emailaddress1";
          } else if ($new_field) {
          $sendto="emailaddress2";
          } else {
          $sendto="defaultemailaddress";
          }

          Code to modify:
          mail($sendto,"Form Submitted at your website",$message,"From: phpFormGenerator");

          Obviously this is just a rough example.  The exact code depends on your form variables.

           
          • TNTEverett

            TNTEverett - 2009-03-23

            I can not tell your how to modify code I have never seen. 
            From my previous post:
            "Obviously this is just a rough example. The exact code depends on your form variables.
            "

             
    • W4Designs

      W4Designs - 2009-03-23

      OK, so you provided the code to modify but didn't say how to modify it. What needs to be added or changed in that line?

      Thanks!

       

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.