How to add an addressee to an email created by php

I use the following code to send email after the user clicks ‘submit’ on a web form. I’d like to add a second email address to send to. I know very little about php. How do I add another addressee, either on the ‘to’ line or the ‘cc’ line?

I really appreciate any help anyone can offier. Thanks.

<?php //$to = '[email protected]'; $to = '[email protected]'; $cc = '[email protected]'; $subject = 'OFA Update'; $message = 'Heres another Update.' ."\r\n"; $headers = 'From: [email protected]' . "\r\n" ; /**/ foreach ($_REQUEST as $key => $value): if ($key != "Submit"){ $message .= "\n$key = $value"; } endforeach; mail($to, $subject, $message, $headers, "[email protected]"); $redirect = "http://ofaclassof1961.wordpress.com/"; header("Location: $redirect"); exit; ?>

Just add a Bcc, or you should be able to add another address after a , eg.

$to = '[email protected]'; $cc = '[email protected]', '[email protected]; or $bcc ='[email protected]'; $subject = 'OFA Update'; $message = 'Heres another Update.' ."\r\n"; $headers = 'From: [email protected]' . "\r\n" ;

Sorry, missed an ’ in that one

Sponsor our Newsletter | Privacy Policy | Terms of Service