OK I figured this script out, yeah for me, here is the correction for someone else
Replace $headers with this:
$headers = "From: webmaster@example.com" . "\r\n" .
"CC: somebodyelse@example.com";
The first line ( $email=$values["Email"]; ) refers to input text where people enter there email.
L
function BeforeAdd(&$values)
{
// Parameters:
// $values - Array object.
// Each field on the Add form represented as 'Field name'-'Field value' pair
//** Send email with new data ****
$email=$values["Email"];
$message="YOUR MESSAGE \n\n";
$subject="SUBJECT";
$headers = "From: $from \r\n Cc: $Cc "; ( I added "\r\n Cc: $Cc" but it does not send email )
foreach($values as $field=>$value)
$message.= $field." : ".$value."\r\n\n";
mail($email, $subject, $message, $headers);
return true;
// return true if you like to proceed with adding new record
// return false in other case
}