<commit_before><?php defined('C5_EXECUTE') or die("Access Denied.");

$subject = 'New Website Form Submission: ' . $form_title;

$body = 'Submitted on ' . date('n/j/y \a\t g:ia', $timestamp) . ' from page "' . $page_title . '":' . "\n\n";
foreach ($fields as $name => $field) {
	$body .= "{$field['label']}: {$field['value']}\n";
}
$body .= "\n";<commit_msg>notification email now includes html body as well (with form fields laid out in a table so they line up nicely)<commit_after><?php defined('C5_EXECUTE') or die("Access Denied.");
$th = Loader::helper('text');

$subject = 'New Website Form Submission: ' . $form_title;

$body = 'Submitted on ' . date('n/j/y \a\t g:ia', $timestamp) . ' from page "' . $page_title . '":' . "\n\n";
$bodyHTML = '<p>' . $th->entities($body) . '</p><table><tbody>' . "\n";

foreach ($fields as $name => $field) {
	$body .= "{$field['label']}: {$field['value']}\n";
	$bodyHTML .= '<tr><td align="right">' . $th->entities($field['label']) . ':</td><td>' . $th->entities($field['value']) . '</td></tr>'. "\n";
}
$body .= "\n";
$bodyHTML .= "</tbody></table>\n";

{'fraction_non_alphanumeric': 0.27123287671232876, 'fraction_numerical': 0.0018264840182648401, 'mean_word_length': 4.169811320754717, 'pattern_counts': {'":': 2, '<': 17, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6864', 'n_tokens_mistral': 394, 'n_tokens_neox': 395, 'n_words': 100}