make email adresses and path configurable

This commit is contained in:
2014-12-08 16:11:45 +01:00
parent 78b3b86c1e
commit fc204cf8b2
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -1,3 +1,7 @@
TOEMAIL=destination@email.com
FREMAIL=sender@email.com
SENDMAILPATH=/usr/sbin/sendmail
NAME[0]=shortname1 NAME[0]=shortname1
HOST[0]=example.com HOST[0]=example.com
+3 -3
View File
@@ -10,8 +10,8 @@ function fappend {
} }
function mailsend { function mailsend {
TOEMAIL="mail@mehl.mx"; TOEMAIL="$TOEMAIL";
FREMAIL="tech@mehl.mx"; FREMAIL="$FREMAIL";
SUBJECT="[MON] $1"; SUBJECT="[MON] $1";
MSGBODY1="$2" MSGBODY1="$2"
MSGBODY2="$3" MSGBODY2="$3"
@@ -26,7 +26,7 @@ function mailsend {
fappend $TMP ""; fappend $TMP "";
fappend $TMP "$MSGBODY2"; fappend $TMP "$MSGBODY2";
fappend $TMP ""; fappend $TMP "";
cat $TMP | /usr/sbin/sendmail -t; cat $TMP | "$SENDMAILPATH" -t;
rm $TMP; rm $TMP;
} }