diff options
Diffstat (limited to 'execute/mail.sh')
-rwxr-xr-x | execute/mail.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/execute/mail.sh b/execute/mail.sh new file mode 100755 index 0000000..2d757db --- /dev/null +++ b/execute/mail.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# (C) 2015 by Christian Hesse <mail@eworm.de> +# +# This software may be used and distributed according to the terms +# of the GNU General Public License, incorporated herein by reference. + +while getopts "i:p:m:" opt; do + case ${opt} in + i) + IDENTIFIER="${OPTARG}" + ;; + p) + PRIORITY="${OPTARG}" + ;; + m) + MESSAGE="${OPTARG}" + ;; + esac +done + +mail -s "[${PRIORITY}] ${IDENTIFIER}" mail@example.com <<< "${MESSAGE}" + +exit 0 + +# vim: set syntax=sh: |