Page 1 of 1

E-mail Form: Send to address given by user?

Posted: Wed Nov 29, 2006 9:49 pm
by lrsdscout
I would like to make a simple form that has 2 boxes:

box 1 = user enters a friend's e-mail address

box 2 = user enters a message

user then hits a submit button and the message is sent to e-mail address is box 1. Is this possible?

I have made plenty of "regular" PHP feedback forms, but I can't figure out how to connect the address in box 1 to the mail($sendTo, etc.);

I'll send $1 paypal to anyone that can solve this for me :D

Posted: Wed Nov 29, 2006 10:09 pm
by Burrito

Code: Select all

mail($_POST['to'],"some subject",$_POST['body']);

Posted: Wed Nov 29, 2006 10:14 pm
by Cameri
Of course, your webserver must have the smtp configured or you'll have to do it by yourself.
Burrito, this is your one time chance to earn $1!

Posted: Thu Nov 30, 2006 8:37 am
by Burrito
Cameri wrote:Burrito, this is your one time chance to earn $1!
I think I'll be ok w/o that dollar, someone else should get it.