Remove mysqli connection vars when passing mail data to addToMailQueue Function

This commit is contained in:
johnnyq
2025-01-22 20:56:24 -05:00
parent c5c809791a
commit 2c51289d75
21 changed files with 60 additions and 64 deletions

View File

@@ -105,7 +105,7 @@ if (isset($_POST['test_email_smtp'])) {
'body' => $body
]
];
$mail = addToMailQueue($mysqli, $data);
$mail = addToMailQueue($data);
if ($mail === true) {
$_SESSION['alert_message'] = "Test email queued successfully! <a class='text-bold text-light' href='admin_mail_queue.php'>Check Admin > Mail queue</a>";

View File

@@ -81,7 +81,7 @@ if (isset($_POST['add_user'])) {
'body' => $body
]
];
$mail = addToMailQueue($mysqli, $data);
$mail = addToMailQueue($data);
if ($mail !== true) {
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $email'");