18 lines
306 B
Bash
18 lines
306 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# If offline, direct mail to msmtp-enqueue.sh
|
||
|
# If online, direct mail to msmtp directly
|
||
|
|
||
|
|
||
|
CURDIR=$(dirname "$(readlink -f "$0")")
|
||
|
source "$CURDIR"/shared-functions.so
|
||
|
|
||
|
mail=$(cat)
|
||
|
par="$@"
|
||
|
|
||
|
if [ "$var_conn" == "off" ]; then
|
||
|
echo "$mail" | $MSMTP_EN $par
|
||
|
else
|
||
|
echo "$mail" | msmtp $par
|
||
|
fi
|