Menu

multiple recipients

Help
Allan
2007-03-15
2013-06-03
  • Allan

    Allan - 2007-03-15

    How would I go about configuring the form generator so that a client could pick from several recipients and send their request to them rather that have all form output go to one email address?

     
    • TNTEverett

      TNTEverett - 2007-03-15

      Your process.php file does this function.  It is currently set to deliver the email to an address you define once.  You can edit the process.php file to replace the email address with a variable collected from your form. 

      Look for this line
      mail("youremail@yourdomain","Form Submitted at your website",$message,"From: phpFormGenerator");

      Change to

      mail($sendtoemail,"Form Submitted at your website",$message,"From: phpFormGenerator");

      This assumes your form collects an email address with a variable name "sendtoemail".

      There are of course many ways to achieve the same thing, or more, but this should do exactly what you requested. 

       
    • Allan

      Allan - 2007-03-16

      Thanks! Everything my little brain could think of was soooo much more complicated!

       
    • collinwho

      collinwho - 2007-04-04

      I would like to do the same thing. How would I monitor that line so that the results of a dropdown box would control who the email is sent to?

      Basically, I want the first field to be "I would like to email" with option1, option2, etc, and then when the person hits send, it automatically goes to option1, option2, etc depending on what they picked.

       
      • TNTEverett

        TNTEverett - 2007-04-04

        This is what selection boxes are designed to do.  You don't monitor drop down selection boxes.  You define the options and the one selected is forwarded to the form processor (process.php). 

         
    • collinwho

      collinwho - 2007-04-04

      oops, I meant modify, not monitor.

      I'm sorry if this is a dumb question, I'm really a designer, so this isn't an area I usually work in. I'm trying to create a simple contact form that will allow someone to send an email to either me or two other people. The basic setup that I went through initally just sends all emails to me and then has a line at the top that says who was selected in the dropdown box. Is there an easy way to fix this, or does this cover more than I should be asking in this forum?

       
      • TNTEverett

        TNTEverett - 2007-04-04

        Create the form you want, with the drop down options you want.  Then send me another message and I'll help you modify the process.php file to send the emails to the drop down option selected. 

         
        • collinwho

          collinwho - 2007-04-05

          The form is here. http://nixonnoise.com/form/use/nixon/form1.html

          Thank you sooooo much for your help!

           

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.