I have a script to send out email from a particular email address. Still mails are going as username@hostname of the server.
#!/bin/bash
# script to send simple email
# Email To ?
EMAIL="sending_to_address"
# Email text/message
EMAILMESSAGE="/mailmessage.txt"
/bin/mail -s "SUBJECT" "$EMAIL" < $EMAILMESSAGE -- -f from_email_address
Please correct it so that I can send mails as from_email_address rather than the hostname.