aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-11-26 22:34:08 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-11-26 22:34:08 +0100
commit46866e2ff232c86b62419810667a3a394a2b4b65 (patch)
tree0cd38725b2bcfe2730ce7388f8a79e33a9bc91be /global-functions
parentb078ce2f0f8544936274506e55ee4ecc5c5425cb (diff)
global-functions: $SendEMail: handle signature with $IfThenElse
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions8
1 files changed, 4 insertions, 4 deletions
diff --git a/global-functions b/global-functions
index ac7cec1..be04150 100644
--- a/global-functions
+++ b/global-functions
@@ -719,6 +719,7 @@
:global EmailGeneralCc;
:global LogPrintExit;
+ :global IfThenElse;
:if ([ :len $EmailGeneralTo ] = 0) do={
:return false;
@@ -726,12 +727,11 @@
: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;
+ body=($Message . \
+ [ $IfThenElse ([ :len $Signature ] > 0) ("\n-- \n" . $Signature) "" ]) \
+ file=$Attach;
} on-error={
$LogPrintExit warning ("Failed sending notification mail!") false;
}