Results 1 to 4 of 4

Thread: Sending to Multiple emails via a different drop box in the form

  1. #1
    Join Date
    Jul 2013
    Posts
    2

    Default Sending to Multiple emails via a different drop box in the form

    I am a novice at this, so please bear with me. I have a problem I am trying to solve, and I hope I can find the help I need here.

    I have a simple form on my website for our customers, and one of the drop boxes is to select the city they are closest to. As things sit right now, the form gets emailed (with formmail) to one common email box, but as our company has grown, I now have 20 or more employees getting the mail from this one box and they pick out the one's pertinent to their location. I want to have the form go to individual email boxes based on the city they chose in the box.

    Right now I have the basic line for recipient:
    <input TYPE="hidden" NAME="recipients" VALUE="order@mydomain.com"/>

    I have found where I can change that to something like this:
    <select name="recipients[]">
    <option value="dave@mydomain.com"&gt;Denver</option>
    <option value="john@mydomain.com"&gt;Phoenix</option>
    <option value="phil@mydomain.com"&gt;Bozeman</option>
    <option value="bill@mydomain.com"&gt;Portland</option>
    <option value="mike@mydomain.com"&gt;Albuquerque</option>
    </select>

    But I don't want to have two places on the form to select the city, I just want one. If I do the above, then I lose the ability to put the city on the document that gets emailed both to the customer and to recipient. I want to use one drop down box for BOTH the email recipient and to save the city name to pass on with the form data.

    Is this possible?

  2. #2
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Sending to Multiple emails via a different drop box in the form

    Hi,

    Use an INI file and email aliases using the city names and email addresses. Example for INI file:

    Code:
    [email_addresses]
    Denver = "email1@domain.com"
    Phoenix = "email2@domain.com"
    Portland = "email3@domain.com"
    In your form have your dropdown select box for "City" and then use "derive_fields" to place the value of the "City" field into the recipients field:

    HTML Code:
    <select name="City">
    <option value="Denver">Denver</option>
    <option value="Phoenix">Phoenix</option>
    <option value="Portland">Portland</option>
    </select>
    
    <input type="hidden" name="derive_fields" value="recipients=City">
    Here's the documentation for setting up an INI file:
    http://www.tectite.com/fmhowto/inifile.php

    ginger

  3. #3
    Join Date
    Jul 2013
    Posts
    2

    Default Re: Sending to Multiple emails via a different drop box in the form

    Thanks Ginger. I actually figured it out after reading some other threads here and putting together what I needed. At first I was getting an internal error, but it was because I was not using the full server path for the .ini file. Once I corrected that, it all seems to work fine. I appreciate the help!

  4. #4
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Sending to Multiple emails via a different drop box in the form

    Great... glad it's working.

    ginger

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 20-Jul-2012, 08:26 PM
  2. sending data spanning multiple emails with one submit
    By nobody in forum Features Questions
    Replies: 1
    Last Post: 08-Mar-2009, 12:33 AM
  3. AutoRespond not sending emails to person filling out form
    By darrennye in forum Community Support
    Replies: 1
    Last Post: 10-May-2008, 04:37 AM
  4. Sending Multiple emails
    By avo in forum Community Support
    Replies: 3
    Last Post: 22-Aug-2007, 11:32 AM
  5. Sending a wish list to multiple recipients that the user specifies in the form
    By Blizzard in forum FormMail Subscription Support
    Replies: 10
    Last Post: 11-Sep-2005, 03:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •