<commit_before><?php
/*******************************************************************************
 *
 *  filename    : EmailSend.php
 *  description : Sends emails and lists addresses
 *
 *  http://www.infocentral.org/
 *  Copyright 2001-2003 <NAME>
 *
 *  InfoCentral is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 ******************************************************************************/
 
// Include the function library
require "Include/Config.php";
require "Include/Functions.php";
require "Include/ReportFunctions.php";

// Load the PHPMailer library
LoadLib_PHPMailer();

// Set the page title and include HTML header
$sPageTitle = gettext("Email Sent");
require "Include/Header.php";

$mail = new ICMail;

$email_array = $_POST['emaillist'];

if ( is_array($email_array) == TRUE )
{
	$mail->IsSMTP();
	$mail->SMTPKeepAlive = true;
	foreach ($email_array as $email_address)
	{
		if ($email_address != "") {
			$mail->Subject = stripslashes($_POST['emailtitle']);
			$mail->Body = stripslashes($_POST['emailmessage']);
			if ($_POST['submitBCC'])
				$mail->AddBCC($email_address);
			else
				$mail->AddAddress($email_address);
			echo '<b>' . $email_address . '</b><br />';
			if(!$mail->Send())
				echo "There has been a mail error sending to " . $email_address . "<br>";
			$mail->ClearAddresses();
		}
	}
	$mail->SmtpClose();
}
else
{
	echo gettext("No email addresses specified!");
}
?><commit_msg>Clear the BCCs so they don't run away<commit_after><?php
/*******************************************************************************
 *
 *  filename    : EmailSend.php
 *  description : Sends emails and lists addresses
 *
 *  http://www.infocentral.org/
 *  Copyright 2001-2003 <NAME>
 *
 *  InfoCentral is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 ******************************************************************************/
 
// Include the function library
require "Include/Config.php";
require "Include/Functions.php";
require "Include/ReportFunctions.php";

// Load the PHPMailer library
LoadLib_PHPMailer();

// Set the page title and include HTML header
$sPageTitle = gettext("Email Sent");
require "Include/Header.php";

$mail = new ICMail;

$email_array = $_POST['emaillist'];

if ( is_array($email_array) == TRUE )
{
	$mail->IsSMTP();
	$mail->SMTPKeepAlive = true;
	foreach ($email_array as $email_address)
	{
		if ($email_address != "") {
			$mail->Subject = stripslashes($_POST['emailtitle']);
			$mail->Body = stripslashes($_POST['emailmessage']);
			if ($_POST['submitBCC'])
				$mail->AddBCC($email_address);
			else
				$mail->AddAddress($email_address);
			echo '<b>' . $email_address . '</b><br />';
			if(!$mail->Send())
				echo "There has been a mail error sending to " . $email_address . "<br>";
			$mail->ClearAddresses();
			$mail->ClearBCCs();
		}
	}
	$mail->SmtpClose();
}
else
{
	echo gettext("No email addresses specified!");
}
?>
{'fraction_non_alphanumeric': 0.23255105150868638, 'fraction_numerical': 0.005486132276744895, 'mean_word_length': 4.534569983136594, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1647167', 'n_tokens_mistral': 1062, 'n_tokens_neox': 966, 'n_words': 270}