Send form message to sender also

I recently had the following question from a FCF user:

QUESTION

‘How can I send the information in the FCF to the person completing the form, as well as to myself?’

ANSWER

In order to have the email message (which the form generates) also sent to the form user, you need to make a simple change to ‘process_form.php. Follow the simple steps below.

Step One:

Open process_form.php in your favorite text/script editor.

Step Two:

Go-to line number 163 (with the line: // send the email)

Step Three:

Create 2 new lines under line number 163, and enter the following :

$email_message = “Thank you for contacting us, we have received the following message\n\n”.$email_message;
@mail($email_from, $email_subject, $email_message, $headers);

(note: if you copy/paste the above code, you may need to fix the double quote characters!)

Step Four:

Save the file and upload to your server (overwrite the original process_form.php file if it already exists)

What the above script modification will do

With the above modification in place, your form will now send a message to the form user as well as you. However the form users message will start with the text ‘Thank you for contacting us, we have received the following message’ (and your message will appear under this).

If you send me your modification requirements, I will hopefully base a new post on your question!

3 Responses to “Send form message to sender also”

  1. smurfit Says:

    Hi - I’ve been using your script for a couple of months and it is fab, no spam whatsoever and easy to use. Thanks so much!

    I was wondering whether there was anyway of logging the IP address of the people who submit the forms? I occasionally get kids or jokers sending in daft (although technically relevant) things to my site and I’d like to keep a little list of people to be wary of! Thanks for any info.

  2. admin Says:

    Glad you like it :)
    Sure, I’ll create a new post covering a simple method on how to capture the users IP address.

  3. Bose321 Says:

    I really dont get it to work, i changed everything i needed to do, but i dont get the emai.

Leave a Reply

You must be logged in to post a comment.