diff options
author | Malf Furious <m@lfurio.us> | 2017-06-06 00:48:02 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2017-06-19 23:57:39 -0400 |
commit | 4211ae67018059407830e60ec4199c80320b6dc3 (patch) | |
tree | df57e1a58423b2da85e0eeb4efbc6203743e5098 /app | |
parent | 5d43957594589143f0257a918a99b4d6977bdafc (diff) | |
download | scrott-4211ae67018059407830e60ec4199c80320b6dc3.tar.gz scrott-4211ae67018059407830e60ec4199c80320b6dc3.zip |
Update global function sendEmail()
Function should be only sending to one recipient at a time.
Diffstat (limited to 'app')
-rw-r--r-- | app/class/globals.php | 7 |
1 files changed, 2 insertions, 5 deletions
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; |