From 4211ae67018059407830e60ec4199c80320b6dc3 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 6 Jun 2017 00:48:02 -0400 Subject: Update global function sendEmail() Function should be only sending to one recipient at a time. --- app/class/globals.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/class/globals.php b/app/class/globals.php index a84ed39..e4285cd 100644 --- a/app/class/globals.php +++ b/app/class/globals.php @@ -153,7 +153,7 @@ function saveFile(array $file, string $path, int $maxsize, ?array $allowedMime = * parameters. If config is not established, delivery is * not attempted. Send status (t/f) is returned. */ -function sendEmail(string $subject, array $rcpt, string $mesg) : bool +function sendEmail(string $subject, string $rcpt, string $mesg) : bool { if (settings::smtpServer() == "") return false; @@ -168,10 +168,7 @@ function sendEmail(string $subject, array $rcpt, string $mesg) : bool $mail->Port = settings::smtpPort(); $mail->setFrom(settings::smtpEmailAddress()); - - foreach ($rcpt as $to) - $mail->addAddress($to); - + $mail->addAddress($rcpt); $mail->Subject = $subject; $mail->Body = $mesg; -- cgit v1.2.3