Commit 41c91f80 authored by fwinkler's avatar fwinkler

Added email function in pika_utils.sh and a file containing all email addresses.

parent 4bc262dd
frank.winkler@tu-dresden.de
#robert.dietrich@tu-dresden.de
......@@ -11,3 +11,15 @@ function mysql_command()
fi
echo $result
}
function send_email()
{
# $1 - subject
# $2 - filename printed as email text
if [ -f ${PIKA_ROOT}/pika_emails ]; then
while IFS= read -r line; do
[[ "$line" =~ ^#.*$ ]] && continue
mail -S smtp=mailin5.zih.tu-dresden.de -s "$1" -r $HOSTNAME@taurus.hrsk.tu-dresden.de $line < $2
done < ${PIKA_ROOT}/pika_emails
fi
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment