Mail commands

Currently, I would need to keep cc a person in the email.

I am using

 hpunix 
mailx -s "instance has been started now" -c Karthi@wide.com arun@wide.com < /dev/null

When I tried the above the command the email is not triggered to the user.

Can you please let me know the exact the command to send email to the cc person.

Hi Rankumar,

As per man mailx

-c should work.

Are you getting any errors?

Does below work

echo "Simple Test" | mailx -s "Test" arun@wide.com

the option which you have provided is working for me.

-c doesn't work for me.

Not sure whether it will work in hp-ux system.

I would suggest you run man mailx on your desired machine and see what it says regarding sending cc

Does below help?

I checked & for cc it denoted to provide the ~c.

I have tried the below command, but the test2 mail is not listed in the cc list.

 mailx -s "test" test1@wide.com ~c test2@wide.com </dev/null;

How about using -c instead of using the tilde ~c ?