Forms - sent to sender?

Hi All,

I’ve just been asked to set up a enquiry form, where-by when it is submitted a copy of the completed form goes to both the person who filled it in, and the company who they are sending the form to.

Working on the idea that there is a field on the form for the person to fill out their email address.

I would imagine this has been asked before. But I can only think of long winded ways of asking the question so can’t seem to find a relevant answer.

Many thanks,


Sure, you just need to add the email of the sender as a cc:

Two places to look at for more information are this email wizard:

And the php manual for mail:

If you want to do something fancier, you can also use phpMailer:

Thanks for the reply. I’ve had a look through the links you sent me but can’t seem to find the relevant details, I’m sure this is me being stupid. Maybe to many snow balls have hit me on the head today?

I would imagine that the form would have to be php to solve this problem which i’m ok with. The first link that was attached I can download a basic php form which I am ok to adapted, but can’t seem to find the code I would need to include that say send a copy of this form to the email address that has been entered into the form.

Many thanks for the response.

Hi Q,

This example below is copied from the mail() page on
Notice how cc is used in the headers.

You can store the recipients email in a variable like $from_email and change the code below to:

$headers .= ‘Cc: $from_email’ . "\r

// multiple recipients
$to  = '' . ', '; // note the comma
$to .= '';

// subject
$subject = 'Birthday Reminders for August';

// message
$message = '
  <title>Birthday Reminders for August</title>
  <p>Here are the birthdays upcoming in August!</p>

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\\r\
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\\r\

// Additional headers
$headers .= 'To: Mary <>, Kelly <>' . "\\r\
$headers .= 'From: Birthday Reminder <>' . "\\r\
[COLOR="Purple"]$headers .= 'Cc: [email][/email]' . "\\r\

// Mail it
mail($to, $subject, $message, $headers);


Apologies for not replying earlier.

Just wanted to say a quick thank you for highlighting the relevant details in the link.

From this I have managed to sort out the form. Just need to add a bit of styling now. Though have a couple of links to work from.