#!/bin/bash
#subject
SUBJECT="your mail subject"
# destination
EMAIL="user@xxxx.com"
#message
EMAILMESSAGE="/home/log/emailtext.log"
echo "testing mail"> $EMAILMESSAGE
echo "mail's msg" >>$EMAILMESSAGE
# send an email using /bin/mail
/usr/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
No comments:
Post a Comment