Mailx Help...send to recipients from a list.

I would like to send a mailx email to all recipients listed in a file by username.  Does anyone know the syntax to do this?  Also, if I wanted to attach the very same file, can I simply append the command with the "< filename" redirect?  Thanks.
FerrisUMLAsked:
Who is Participating?
 
yuzhConnect With a Mentor Commented:
If your file looks like:

   user1
   user2
   user3@somewhere
   ...

   you can do:
   mailx -s"Your Subject" `cat /path-to/list" < /path-to/messages

   man mailx
   to learn more details
0
 
FerrisUMLAuthor Commented:
Oh, it would be from a single command...not a script.  Thanks.
0
All Courses

From novice to tech pro — start learning today.