I'm trying recall how to set up a script to have mailx read a mailing list of people to recieve a message.
I had set up the script to have every name inside but the list could grow and/or change.
can any one help?
I'm using HPUX 11 on a rp7410.
I'm trying recall how to set up a script to have mailx read a mailing list of people to recieve a message.
I had set up the script to have every name inside but the list could grow and/or change.
can any one help?
I'm using HPUX 11 on a rp7410.
You don't usually do it that way. Edit the .mailrc file for the profile sending the mail.
You can create either an alias or a group in the $HOME/.mailrc file
/etc/mail/aliases is used for really long lists of names - more than 1024 characters.
Thanks for the info Jim. I used the aliases file. It was successful. I know there is way to have the script read the names from the file and insert them. It was simple one line string. It has been many years since I had to use. Oh well it will come to me in the middle of the night... Thanks again
use "-t" option to mail command ...
The OP wanted to use mailx, which doesn't support -t
echo "Message" | mailx -s "Subject" $(<mailing_list.txt)