When I use this to send a mail I get the sender address as (root)<noreply@rediff.co.in>
where root
is the host name .
mailx -s 'Spammers `date -d "-1 days" +%Y-%m-%d`' mail_id1@gmail.com,mail_id2@gmail.com -- -r 'noreply@gmail.com'
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`' mail_id1@gmail.com,mail_id2@gmail.com -- -r 'noreply@gmail.com (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`' mail_id1@gmail.com,mail_id2@gmail.com -- -F 'Spam Alert' -r 'noreply@gmail.com'