From d9b587fd4a02ce4794c73bdede612d5207a2ce43 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 7 Feb 2019 17:04:41 +0100 Subject: [PATCH] Fixed email RFC822 check --- dev/ofunctions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 0fea9b8..96438c2 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -573,8 +573,9 @@ function SendEmail { local i - if [ "${destinationMails[@]}" != "" ]; then - for i in "${destinationMails[@]}"; do + if [ "${destinationMails}" != "" ]; then + # Not quoted since we split at space character, and emails cannot contain spaces + for i in ${destinationMails}; do if [ $(CheckRFC822 "$i") -ne 1 ]; then Logger "Given email [$i] does not seem to be valid." "WARN" fi