jonmbake / bootstrap3-contact-form

Bootstrap 3 Contact Form with Captcha
MIT License
169 stars 84 forks source link

second mail user #1

Closed Allmedialab closed 10 years ago

Allmedialab commented 10 years ago

Hi,

I have implemented your form in a website and all is working fine!

Would it be very difficult to let a second mail send to the user of the form!?

Can you please point me out how to do that?

Thanks! David

jonmbake commented 10 years ago

Hi David.

I think the PHP:mail function will send to multiple e-mail addresses if the first argument is a comma separated list of e-mail addresses. So if you change the mail call on line 50 of library/sendmail.php from:

mail(MY_EMAIL, "Feedback Form Results", setMessageBody($_POST["name"], $message), "From: $email")

to:

mail(MY_EMAIL . ', ' . $email, "Feedback Form Results", setMessageBody($_POST["name"], $message), "From: $email")

(notice the first argument change).

It should then send to both the contact and the user of the form.

Jon

Allmedialab commented 10 years ago

Thanks Jon, I really appreciate your help! Complements for the excellent scripting! David