Can anyone tell me on how to combine multiple form fields (which contain email addresses) and incorporate them into a $header CC: ?
I currently have this:
$headers .= 'CC: <'.$_POST['submitted_by'] ."> \r\nReply-To:<".$_POST['submitted_by'].">";
which works fine but I now need to add another field “sales” to the Cc: and everything I try does not work.
First, try to make it more “readable”.
Try something like this:
Now, can’t you just put it in the next line of the CC? I don’t see where the problem is.
Last but not least. Remember to filter the fields! To prevent header injection.