Hello,
How can I send the form results to the person who fills it out. Currently, I am having it sent to me.
//The email address the message will be sent to
$youremail = "ttttt@ttttt.com";
<?
//Checks to see if the name field is empty. You can delete or add fields as needed.
if ( (!empty($name)))
{
$name = stripslashes($name);
$message = stripslashes($message);
//This is where the email is sent using your values from above.
mail("$youremail", "$subject","$thetext");
?>
how recepient to contact form
Moderator: General Moderators
-
tonyledenko
- Forum Newbie
- Posts: 15
- Joined: Thu Sep 11, 2008 4:22 pm
Re: how recepient to contact form
So just change the To address.tonyledenko wrote:Currently, I am having it sent to me.
Or if you want it send to them as well, copy/paste the mail(...) statement and change the address.
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: how recepient to contact form
tasairis, are you suggesting running the same function twice?
tonyledenko, have you tried using either the BCC or CC fields? Also email, email, email format in top field?
tonyledenko, have you tried using either the BCC or CC fields? Also email, email, email format in top field?
Re: how recepient to contact form
tonyledenko wrote:Hello,
How can I send the form results to the person who fills it out. Currently, I am having it sent to me.
//The email address the message will be sent to
$youremail = "ttttt@ttttt.com";
<?
//Checks to see if the name field is empty. You can delete or add fields as needed.
if ( (!empty($name)))
{
$name = stripslashes($name);
$message = stripslashes($message);
//This is where the email is sent using your values from above.
mail("$youremail", "$subject","$thetext");
?>
First of all, you don't need the double quotes (") around the $youremail, $subject, $thetext in the mail function.
Secondly, not sure what the issue is with your code. are you getting errors of some sort? It looks fine to me (execpt your using $thetext instead of $message...)
Re: how recepient to contact form
In so many words, yes. He said that "currently" it was sending the emails to him so he already has something working.JAB Creations wrote:tasairis, are you suggesting running the same function twice?
If he wants a copy of the email sent to another person, duplicating the mail() statement after changing the To address should be enough.
Re: how recepient to contact form
Actually, he doesn't need to do that. he could just add CC to the headers... which would make it only one function call instead of 2.
example:
example:
Code: Select all
mail("bob@bob.com","subject", "a message", "CC:someone@bob.com");
//or, for BCC
mail("bob@bob.com","subject", "a message", "BCC:someone@bob.com");
// or, for both CC and FROM
mail("bob@bob.com","subject", "a message", "From:webmaster@bob.com\r\nCC:someone@bob.com\r\n");