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

Posted on 2006-05-07
Last Modified: 2013-12-26
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.
Question by:FerrisUML

    Author Comment

    Oh, it would be from a single command...not a script.  Thanks.
    LVL 38

    Accepted Solution

    If your file looks like:


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

       man mailx
       to learn more details

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Title # Comments Views Activity
    Login Script to Copy Folders 12 12
    sum67 challenge 35 76
    fizzArray  challenge 1 28
    has77  challenge 9 56
    Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
    Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now