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

@@ -312,10 +312,16 @@ if (isset($_GET['share_generate_link'])) {
}
$body = "Hello,<br><br>$session_name from $session_company_name sent you a time sensitive secure link regarding '$item_name'.<br><br>The link will expire in <strong>$item_expires_friendly</strong> and may only be viewed <strong>$item_view_limit</strong> times, before the link is destroyed. <br><br><strong><a href='$url'>Click here to access your secure content</a></strong><br><br>~<br>$session_company_name<br>Support Department<br>$config_ticket_from_email";
$mail = sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_password, $config_smtp_encryption, $config_smtp_port,
$config_mail_from_email, $config_mail_from_name,
$item_email, $item_email,
$subject, $body);
$data = [
[
'recipient' => $item_email,
'recipient_name' => $item_email,
'subject' => $subject,
'body' => $body,
]
];
$mail = addToMailQueue($mysqli, $data);
if ($mail !== true) {
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $item_email'");