I have written the mailx command like this
echo "${BDY_MSG}" | mailx -r <from_address> -s <subject> <to_address>
Now I need to set the priority of this mail.How do I do that?
You'll have to look at your mailx
manpage to see what options are accepted. Two solutions in increasing order of hack-iness:
mailx
supports the -a
option to add an additional header option, you can use -a "X-Priority:1"
.mailx
does not support the -a
option, you can try to hack it in by using this trick from this other post by adding a newline to the subject: -s "$(echo -e "This is the subject\nX-Priority: 1")"
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