I wrote the following simple bash script to send mail:
The script runs fine (no errors are returned), but username@domain.com never received an email. Does anyone know what can possibly be the problem? Does something need to be configured?
Code:
#!/bin/bash
SUBJECT="testsubj"
EMAIL="username@domain.com"
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "testbody">$EMAILMESSAGE
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE