When I use this to send a mail I get the sender address as (root)<[email protected]>
where root
is the host name .
mailx -s 'Spammers `date -d "-1 days" +%Y-%m-%d`' [email protected],[email protected] -- -r '[email protected]'
Either I want to remove the host name completely in the sender description or specify another name.
Any help is appreciated.
Update:
I have also tried the same as mentioned by Rune in this question How set the From email address for mailx command? which doesn't seem to work.
mailx -s 'Spammers `date -d "-1 days" +%Y-%m-%d`' [email protected],[email protected] -- -r '[email protected] (Anonymous)'
This is what I had done to solve it. I just added -F 'Sender Name'
mailx -s 'Spammers `date -d "-1 days" +%Y-%m-%d`' [email protected],[email protected] -- -F 'Spam Alert' -r '[email protected]'