summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsms.d/phone11
1 files changed, 7 insertions, 4 deletions
diff --git a/sms.d/phone b/sms.d/phone
index 4e4ddd7..4e08104 100755
--- a/sms.d/phone
+++ b/sms.d/phone
@@ -15,10 +15,13 @@ export smtp=mail.bitbase.dk
export from=hp@fossasia.org
export sender="$from"
-# Send message (...just to stdout if invoking from cmdline)
-sendit() {
+mail_subject="[sms] phone $sms_fromphone"
+mail_recipients="hp@fossasia.org mb@fossasia.org"
+
+doit() {
+ # Send message (...to stdout if invoked from cmdline)
if [ -n "$sms_phone" ]; then
- mail -s "[sms] phone $sms_fromphone" hp@fossasia.org mb@fossasia.org
+ mail -s "$mail_subject" $mail_recipients
else
cat
fi
@@ -27,7 +30,7 @@ sendit() {
# Check keyword and break after processing if it matches
case "$app" in
phone)
- cat <<EOF | sendit
+ cat <<EOF | doit
Someone at $sms_fromphone sent an sms to $sms_phone with keyword phone
and this message (supposedly his/her name):
$msg
lass='rem' style='width: -nan%;'/> -rw-r--r--tags/a8/13/162049226820.32274.15963712190217965452@wilder.debian.org/killed0
-rw-r--r--tags/a8/13/162049226820.32274.15963712190217965452@wilder.debian.org/unread0
-rw-r--r--tags/a8/13/20020829050854.876B526BAF@auryn.jones.dk/sent0
-rw-r--r--tags/a8/13/20191126110001.D88B81CE0B8@lxp5.free-owl.de/sys0
-rw-r--r--tags/a8/13/20191126110001.D88B81CE0B8@lxp5.free-owl.de/unread0
-rw-r--r--tags/a8/13/20201229054834.245D61C2@jawa.homebase.dk/hb0
-rw-r--r--tags/a8/13/20201229054834.245D61C2@jawa.homebase.dk/sys0
-rw-r--r--tags/a8/13/20201229054834.245D61C2@jawa.homebase.dk/unread0
-rw-r--r--tags/a8/13/37782105.4ADE88E1@jones.dk/sent0
-rw-r--r--tags/a8/13/4D4172C3.8080802@schmehl.info/debian0
-rw-r--r--tags/a8/13/878uojcymh.fsf@windlord.stanford.edu/debian0
-rw-r--r--tags/a8/13/E1kcNvS-0005JH-Aj@fasolo.debian.org/debian0
-rw-r--r--tags/a8/13/E1kcNvS-0005JH-Aj@fasolo.debian.org/inbox0
-rw-r--r--tags/a8/13/E1kcNvS-0005JH-Aj@fasolo.debian.org/killed0
-rw-r--r--tags/a8/13/E1kcNvS-0005JH-Aj@fasolo.debian.org/unread0
-rw-r--r--tags/a8/13/fd535e260901301111o16bf4c85g10c8ee54e889ccd6@mail.gmail.com/sugar0
-rw-r--r--tags/a8/13/handler.778426.D778426.159670012131028.ackdone@bugs.debian.org/debian0
-rw-r--r--tags/a8/13/handler.778426.D778426.159670012131028.ackdone@bugs.debian.org/killed0
-rw-r--r--tags/a8/13/handler.778426.D778426.159670012131028.ackdone@bugs.debian.org/unread0
25 files changed, 0 insertions, 0 deletions