I am new to the AIX environment , and using the mailx command for the first time. I have understood the command inorder to send the email, but I would also like to include the CC email addresses.
I am trying to execute it through Java’s Runtime.exec My command is as follows
cat EMAIL_BODY|mailx -s MAIL_SUBJ MAIL_TO
How can I add a CC to this command
Set the variable
askcc:Read the man page for more information.
You could use the
-coption where you can specify comma-separated list of CC recipients.This you can simply use it in your command from java’s runtime exec.