Jun 22, 2017

How to send to multiple recipients using mailx from command line

To send the mail to multiple recipients, specify all the emails separated by a comma

$ echo "This is message body" | mail -s "This is Subject" [email protected],[email protected]

CC and BCC

The "-c" and "-b" options can be used to add CC and BCC addresses respectively.
$ echo "This is message body" | mail -s "This is Subject" -c [email protected] [email protected]