Code: Select all
// 12/09/2014 Cecil Champenois. Set the email up to send to Client 40023, or 40024.
// Added additional conditions to account for the fact that the user may not enter an email address.
if (($_SESSION['active_client'] == 40024) || ($_SESSION['active_client'] == 40023)) {
if $_POST['EmailList']=="" {
// There is nothing in the Session email address variable, EmailList.
$_POST['EmailList']=$_POST['EmailList'] . "searshc@ap-audit.com" . "," . $_SESSION['user_email'];
} else {
// 12/09/2014 Cecil Champenois. In the below case, the user has entered an email address.
// The email address which the user entered will precede the following clinet's and User's own email addresses.
$_POST['EmailList']=$_POST['EmailList'] . ",searshc@ap-audit.com" . "," . $_SESSION['user_email'];
}
} else { // 12/09/2014 Cecil Champenois. If it's not 40023 (or40024), then send whatever the user types in and also the user's email address.
// 12/09/2014 Cecil. New line of code to pass user_email over to EmailList.
if ($_POST['EmailList']=="") {
$_POST['EmailList']=$_SESSION['user_email'];
} else {
$_POST['EmailList']=$_POST['EmailList'] . "," . $_SESSION['user_email'];
}
}
$email_to=$_POST['EmailList'];
$headers = "From: " . $email_from;
//more code that isn't showing...