diff options
author | Christian Hesse <mail@eworm.de> | 2018-10-09 15:54:44 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-10-09 15:57:53 +0200 |
commit | 2e64b97888c5c2a9c82a0ec7d618825db40c05c8 (patch) | |
tree | 2a83740e5cc3069516fd8bf12eac4232cbee430b | |
parent | e6c217aa0c9d497a6b6dcf5f49d485127566612d (diff) |
sms-forward: use function for notification
-rw-r--r-- | sms-forward | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sms-forward b/sms-forward index 76bc1f7..70699c0 100644 --- a/sms-forward +++ b/sms-forward @@ -8,6 +8,8 @@ :global "email-general-to"; :global "email-general-cc"; +:global SendNotification; + # check mail server :if ([ / tool netwatch get [ find where comment=[ / tool e-mail get address ] ] status ] != "up") do={ :error "Mail server is not up."; @@ -26,9 +28,8 @@ :if ($phone = $allowed && message~("^:cmd " . $secret . " script ")) do={ :log debug "Ignoring SMS, which starts a script."; } else={ - / tool e-mail send to=$"email-general-to" cc=$"email-general-cc" \ - subject=("[" . $identity . "] SMS Forwarding") \ - body=("A message was received by " . $identity . ":\n\n" . \ + $SendNotification ("[" . $identity . "] SMS Forwarding") \ + ("A message was received by " . $identity . ":\n\n" . \ "Phone: " . $phone . "\n" . \ "Timestamp: " . $timestamp . "\n" . \ "Type: " . $type . "\n\n" . \ |