0
We have an Oracle Linux box running kernel 2.6.39. We like to send mail on command line with this Linux box using root user. When we tried
CC_LIST="ccc@xyz.com,ddd@xyz.com"
cat a.txt | mail -s "Test" "abc@xyz.com, asc@xyz.com" -c "${CC_LIST}"
When we receive the mail in our Outlook, the carbon copy users are not recognized because we have another user appended in the To: list. In the To: list, it contains
abc@xyz.com; asc@xyz.com; -c@myhost.xyz.com; ccc@xyz.com; ddd@xyz.com
In the Cc: list, it is empty.
As you can see, "-c@myhost.xyz.com" messes up the command line.
Where is the mailx configuration file for program /bin/mail ? /bin/mail is linked to mailx
Thank you.
It might be nice to know why this is necessary. – Mokubai – 2015-06-17T06:30:08.627
man mailx says so. – chz – 2015-06-18T06:35:13.593
Are you able to provide a quote from the man page where it states? We like to have all the information needed in one place and a truly complete answer tends to elicit more upvotes. – Mokubai – 2015-06-18T06:41:30.517
Usage: mailx -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users – chz – 2015-06-18T21:41:54.553