formmail with multiple, seperate recipients

  • narrid
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jun 29, 2004
  • Posts: 5
  • Status: Offline

Post June 29th, 2004, 12:00 pm

ive got 6 people i need to use a formmail with.

is it possible for me to have their contacts as a pull down menu, all using the same textarea?

if you want to contact guy1 select his name from the pull down menu, your contact will only be sent to his address

if you want to contact guy2 select his name from the pull down menu, your contact will only be sent to his address

is this possible? any help on how to do this?

i prefer to use a php formmail that will not show the emails in any form, in the source.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 29th, 2004, 12:00 pm

  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post June 29th, 2004, 1:09 pm

I don't think you can do that with the regular formmail script, but it's certainly possible to do using a PHP script.

You just have to have your script check which recipient was chosen, and substitute the appropriate E-Mail address when sending.
  • narrid
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jun 29, 2004
  • Posts: 5
  • Status: Offline

Post June 29th, 2004, 1:54 pm

if it isnt too difficult, could you show me an example code? ive only been using php for less than 2 months, cant say im all too experienced with it just yet
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post June 29th, 2004, 2:08 pm

Well, basically, you're just watching out for a variable.. (your drop down list box)...

Look what its value is, and then do whatever based on the value of that variable.

I'll see if I can dig up some code for you, but it's a fairly straightforward process.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post June 29th, 2004, 2:39 pm

You also might be able to get some ideas from this post:

http://www.ozzu.com/programming-forum/submitting-multiple-email-addresses-t1985.html
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 111 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.