1748128 Members
3649 Online
108758 Solutions
New Discussion юеВ

Re: mailx and cc (-c)

 
HECTOR COLUNGA
Occasional Contributor

mailx and cc (-c)

I'm using mailx to send reports as attachments to my bosses. I can't get -c to send to multiple addresses. It works fine with one address. The man pages explains to enclose the multiple addresses in quotes, but no luck.

(uuencode file.txt file.txt)| mailx -s"Daily Reports" -c boss2@abc.com boss1@abc.com


Hector
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: mailx and cc (-c)

Hi Hector:

Seperate the addresses with commas and drop the '-c' switch:

# ... | mailx -s "Daily Reports" boss2@abc.com, boss1@abc.com

Regards!

...JRF...
spex
Honored Contributor

Re: mailx and cc (-c)

Hector,

Just specify any additional recipients after the first recipient:

echo "hello" | mailx -s "reports" boss1@foo.org boss2@foo.org boss3@foo.org

PCS
inventsekar_1
Respected Contributor

Re: mailx and cc (-c)

see the attachment for some mailx options.

and a question:
-c or ~c?
man mailx also telling that ~c.

Be Tomorrow, Today.