Forum Moderators: coopster

Message Too Old, No Replies

Formmail question

Formmail acknowledgement to sender

         

marrci

7:38 pm on Nov 12, 2009 (gmt 0)

10+ Year Member



Hi!

I build a site, i am beginner.

<snip>

There is a form.
I use phpmail to send the form to a mail adress.

But i need send a copy to the sender, this is a acknoledgement. (Copy of the original message).

How can i clear up this?

marrci

[edited by: dreamcatcher at 7:48 pm (utc) on Nov. 12, 2009]
[edit reason] No Urls Please. See TOS. [/edit]

rocknbil

9:12 pm on Nov 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard marrci, you would see how it's sending mail and duplicate the action for the submittor.

A cheesy but easy method is to just append the "to" address with the submittor's email.

$to = 'admin@example.com';
$to .= ",$email";

OF course, you have to validate the email, make sure it's not being attacked, etc., in either case.

SteveWh

4:00 am on Nov 17, 2009 (gmt 0)

10+ Year Member



What if somebody or a spambot submits the form with an address (or 1000 addresses) belonging to other people? They could potentially use your form to send spam.

If you are a beginner, it is best not to write your own PHP forms handling and email-sending code, unless it's only to learn how, but not use on a live website.

NMS FormMail is a free script you can use, which cannot be tricked into sending spam to other people.

marrci

5:22 pm on Nov 19, 2009 (gmt 0)

10+ Year Member



Thank you rocknbil!

It works fine!

And tnx your tip SteveWh!