More email checks

This commit is contained in:
deajan 2018-07-02 22:09:28 +02:00
parent f79acad239
commit 7cb987a32b
1 changed files with 11 additions and 6 deletions

View File

@ -8,7 +8,7 @@
#### OFUNCTIONS FULL SUBSET #### #### OFUNCTIONS FULL SUBSET ####
#### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MINI SUBSET ####
_OFUNCTIONS_VERSION=2.3.0-dev _OFUNCTIONS_VERSION=2.3.0-dev
_OFUNCTIONS_BUILD=2018070201 _OFUNCTIONS_BUILD=2018070202
#### _OFUNCTIONS_BOOTSTRAP SUBSET #### #### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true _OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END #### #### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -503,11 +503,16 @@ function SendEmail {
local i local i
for i in "${destinationMails}"; do if [ "${destinationMails[@]}" != "" ]; then
if [ $(CheckRFC822 "$i") -ne 1 ]; then for i in "${destinationMails[@]}"; do
Logger "Given email [$i] does not seem to be valid." "WARN" if [ $(CheckRFC822 "$i") -ne 1 ]; then
fi Logger "Given email [$i] does not seem to be valid." "WARN"
done fi
done
else
Logger "No valid email adresses given." "WARN"
return 1
fi
# Prior to sending an email, convert its body if needed # Prior to sending an email, convert its body if needed
if [ "$MAIL_BODY_CHARSET" != "" ]; then if [ "$MAIL_BODY_CHARSET" != "" ]; then