Send mail using mailx to CC only, not TO

Hi All,

I am using mailx to send the mail. Due to some changes in the requirement, I need to send the mail to CC only (an Email id in CC), with no email ID in "TO" field. Can we do that? bcz I used -c flag only and got the message:":The flags you gave make no sense since you're not sending mail." and did not recieve any mail.

Thanks.

How did you do that? can you paste that entire mailx command? -c option should work. May be its lacking the exact substitution.

I am using the below script:

echo "body"| mailx -s 'subject'  -c unankix@gmail.com