Our Forums are now READ ONLY.
We are no longer accepting registrations and you can no longer post or reply to posts.
For over a decade the forums have served our user community well, but in recent times there are no knowledgeable users providing answers in our Community Support forums.
In addition, we're constantly having to ban spammers and remove their posts.
You're still welcome to contact us for support: http://www.tectite.com/contacts.php.
We offer support via a fee-based service.

Re: TO and CC plus multiple option values.

Hi,

One way to do it would be to use the department selection field and name it "recipients", then provide the email addresses for that department in the "value" for each option. The code would look something like this:

What I don't understand is what has to be changed in the formmail.php if anything and where in the php file do I tell it to look for the ini file?

Originally Posted by ginger23

Hi,

One way to do it would be to use the department selection field and name it "recipients", then provide the email addresses for that department in the "value" for each option. The code would look something like this:

(Hopefully that will give you the department name value in the recipients field and not the email address.)

Then in the php script you'll need to set the value of "$FORM_INI_FILE" which is a server path to where the ini file is located on the server. (Preferably it should be stored above the root so it's not accessible to the public.) You can get the server path to the script by running testalert. Put this in your browser: http://yourdomain.com/path-to-formmail.php?testalert=1 . You should then receive an email with the server path which you can adjust according to where you've placed your INI file. (This email will go to the email address you specified in the $DEF_ALERT setting in formmail.php).

Re: TO and CC plus multiple option values.

I already added the ini file to the server and set the path in the formmail.php file.

Make sure that you've specified a "server path" which usually starts with something like /home/user ...

As for your form code, you don't want two Names and two IDs in the same select tag. Remove this from the select tag:

name="Select which dept. you would like to contact." id="Select which dept. you would like to contact.

(I think I'd remove the ampersands from your email aliases if I were you. They may or may not cause problems. Put "and" if you have to.) You can still put the ampersand in the portion of the option tag that displays to the user.