...

View Full Version : Multiple emails on Forms



LauraMoon
06-11-2007, 07:47 PM
I need assign different email addresses according to a drop down list of categories. It is set up to submit a classified ad (https://secure.townnews.com/shared-c...ate=classified) and you have to select a category for your ad, i.e. employment, announcements, etc. I would like to assign a different email to each of these categories. Some of the categories actually have 2 or 3 email addresses they need to go to as well. :thumbsup: Any ideas? I appreciate the help.

whizard
06-11-2007, 07:55 PM
If I understand you, this should work:

In your form:

<select name="categories">
<option value="employment@isp.com">Employment</option>
<option value="announcements@isp.com,secondaddress@isp.com">Announcements</option>
<option value="etc@isp.com">Etc</option>
</select>


Then fill the To: header with the post value of categories

PS- your link doesnt work :p :)

HTH
Dan

LauraMoon
06-11-2007, 08:00 PM
Sorry. Will check it out and see if that works for me. THANKS!

kbluhm
06-11-2007, 08:31 PM
PS- your link doesnt work :p :)
When the URL matches link text containing an ellipsis, 99 our of 100 times it has been copied/pasted to multiple forums from the message text rather than the editor. She probably posted the message in 5 or 6 different places to get as many answers a possible and was unaware that vBulletin shortens the link text of long URLs. It's careless and more often than not renders the message useless to those who would like to help.

LauraMoon
06-11-2007, 08:54 PM
What do you mean by the To: header with the post value of categories?

LauraMoon
06-11-2007, 08:55 PM
Sorry for being careless. My boss was let go and I'm trying to do things I've not done before. Twice the work... ugh.

Fumigator
06-11-2007, 08:57 PM
Sounds like a good time to demand a raise :D

LauraMoon
06-11-2007, 08:59 PM
They gave me a puny one, not enough to get excited about. Now I can buy an extra lunch at McDonald's every month...LOL

whizard
06-11-2007, 10:17 PM
I assume, since you posted in the PHP forum, that you have a PHP script which sends the emails?

If so, the file sets the recipient of the email at some point. The value you want to be used for the To: header is the value from the dropdown box, or $_POST['categories'], using my example

HTH
Dan

CFMaBiSmAd
06-11-2007, 11:20 PM
This is a continuation of this thread - http://www.codingforums.com/showthread.php?t=116140

The categories already exist on the form (at least they did when I looked at the link in the post), it is just necessary that the form processing code be modified to read the category value selected and set the To: email address accordingly.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum