I understood that for changing sender's name with mailx
I should do the following:
mailx -r [email protected] -s "some subject" [email protected]
But when I do that, I get:
mailx: invalid option -- r
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
[-- sendmail-options ...]
mail [-iInNv] -f [name]
mail [-iInNv] [-u user
Does anyone knows what's happening? thanks,
Mailx command to include sender address I am using sender=server name(display name) echo "body" | mailx -s "subject" -b "bcc address" "to address" -- -f "$sender".
Re: Change sender name using sendmailmailx -r [email protected] -s "whatever" email_address. # If you wish to have mail appear to be from some host or location other than the loacl host, set macro M to the name you wish to masquerade as.
The mailx utility is an enhanced version of the mail command. Along with the functionality provided by the original mail command, it provides extra features like the ability to send attachments by using the -a flag.
mailx -a 'From:[email protected]' -s "Subject" [email protected] < text.txt
The correct syntax is:
mailx -s "some subject" [email protected] -- -r [email protected]
The Usage info shows "[-- sendmail-options ...]" and since "-r" is a sendmail option, you need to use the double dashes first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With