Remove any "Send Single Email" declarations except in mail queue.

All emails go through the mail queue, using the addToMailQueue() function.
This commit is contained in:
o-psi
2023-12-19 23:02:05 +00:00
parent 70a9120147
commit 98f731b4d4
11 changed files with 168 additions and 149 deletions

View File

@@ -153,13 +153,18 @@ if (isset($_POST['test_email_smtp'])) {
validateAdminRole();
$email_from = sanitizeInput($_POST['email_from']);
$email_to = sanitizeInput($_POST['email_to']);
$subject = "Hi'ya there Chap";
$body = "Hello there Chap ;) Don't worry this won't hurt a bit, it's just a test";
$subject = "Test email from ITFlow";
$body = "This is a test email from ITFlow. If you are reading this, it worked!";
$mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port,
$email_from, $config_mail_from_name,
$email_to, $email_to,
$subject, $body);
$data = [
[
'recipient' => $email_to,
'recipient_name' => 'Chap',
'subject' => $subject,
'body' => $body
]
];
$mail = addToMailQueue($mysqli, $data);
if ($mail === true) {
$_SESSION['alert_message'] = "Test email sent successfully";