Sending formmail results to user submitted email address

  • AnthonyF
  • Novice
  • Novice
  • User avatar
  • Joined: Jan 26, 2004
  • Posts: 28
  • Status: Offline

Post January 26th, 2004, 1:54 pm

Hey all,

My problem is simple....


I need my cgi form to submit to a required field contained within the form. IE, field 1 is for an email address, and the submit_to call needs to submit via sendmail to this field 1 email address. Simple huh

Well I must be retarded because I can't figure it out.. anyone have a clue?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post January 26th, 2004, 1:54 pm

  • AnthonyF
  • Novice
  • Novice
  • User avatar
  • Joined: Jan 26, 2004
  • Posts: 28
  • Status: Offline

Post January 26th, 2004, 4:55 pm

This a dumb question? If it is just let me know and I'll do more research....
  • RichB
  • Guru
  • Guru
  • User avatar
  • Joined: May 17, 2003
  • Posts: 1121
  • Loc: Boston
  • Status: Offline

Post January 27th, 2004, 12:00 am

I think the standard way of specifying a recipient address for a formmail script is with a hidden field:

Code: [ Select ]
<input type="hidden" name="recipient" value="email@your.host.com">
Free Programming Resources
  • AnthonyF
  • Novice
  • Novice
  • User avatar
  • Joined: Jan 26, 2004
  • Posts: 28
  • Status: Offline

Post January 27th, 2004, 1:08 am

No, I mean like when viewing the form on an HTML page, there will be a area where they can enter an email address to submit the form to as well as the ones listed in the hidden 'recepient' field.

NE clue?
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Joined: Jan 25, 2004
  • Posts: 776
  • Loc: Nippon
  • Status: Offline

Post January 27th, 2004, 2:36 am

This would be very easy to explain in PHP. Do you prefer Perl or would PHP be ok? I've made quite a few scripts like this.
  • AnthonyF
  • Novice
  • Novice
  • User avatar
  • Joined: Jan 26, 2004
  • Posts: 28
  • Status: Offline

Post January 27th, 2004, 12:22 pm

We can try in PHP - my knowledge of PHP is limited to an install of osCommerce tho.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post January 27th, 2004, 3:07 pm

I haven't done it in a long time, but I think this would work:

Code: [ Select ]
<input type="text" name="cc" value="">


If it helps here's a list of email form variables that can be used:
http://alumweb.mit.edu/reference/email/4.shtml

By leaving value="" blank, it should assume whatever is inputed in the text field for the cc variable.
"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.
  • AnthonyF
  • Novice
  • Novice
  • User avatar
  • Joined: Jan 26, 2004
  • Posts: 28
  • Status: Offline

Post January 27th, 2004, 10:37 pm

slicckk.... that did it. Thanks bro, ur a smart mofo!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post January 28th, 2004, 7:09 pm

Glad it helped you AnthonyF.
"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: 9 posts
  • Users browsing this forum: No registered users and 88 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
 
 

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