aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-03-05 10:57:47 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-03-05 11:00:36 +0100
commit3d07ebde0534f3a11d3f149875d1cb0d2f1483e3 (patch)
tree9f67b987a3e252371adc75a2e354923dfd41b3ea
parent227151e189f465ea426dd11bb912ff818046ff8f (diff)
global-functions: $SendEMail: invert condition
-rw-r--r--global-functions24
1 files changed, 13 insertions, 11 deletions
diff --git a/global-functions b/global-functions
index c2727fc..ffd34b8 100644
--- a/global-functions
+++ b/global-functions
@@ -389,18 +389,20 @@
:global EmailGeneralTo;
:global EmailGeneralCc;
- :if ([ :len $EmailGeneralTo ] > 0) do={
- :do {
- :local Signature [ / system note get note ];
- :if ([ :len $Signature ] > 0) do={
- :set Signature ("\n-- \n" . $Signature);
- }
- / tool e-mail send to=$EmailGeneralTo cc=$EmailGeneralCc \
- subject=("[" . $Identity . "] " . $Subject) \
- body=($Message . $Signature) file=$Attach;
- } on-error={
- :log warning "Failed sending notification mail!";
+ :if ([ :len $EmailGeneralTo ] = 0) do={
+ :return;
+ }
+
+ :do {
+ :local Signature [ / system note get note ];
+ :if ([ :len $Signature ] > 0) do={
+ :set Signature ("\n-- \n" . $Signature);
}
+ / tool e-mail send to=$EmailGeneralTo cc=$EmailGeneralCc \
+ subject=("[" . $Identity . "] " . $Subject) \
+ body=($Message . $Signature) file=$Attach;
+ } on-error={
+ :log warning "Failed sending notification mail!";
}
}