LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Regarding mailing to a distribution list (DL) using mail/mailx command (https://www.linuxquestions.org/questions/programming-9/regarding-mailing-to-a-distribution-list-dl-using-mail-mailx-command-619097/)

naren_0101bits 02-06-2008 09:33 AM

Regarding mailing to a distribution list (DL) using mail/mailx command
 
Hi,

I just got strucked-up in using mailx command to send mails to a distribution list.

Till now, in my program, i am using mailx command to send mails to a list of mail id's which are stored in a specific file named notifylist.lst

And now, i need to send the mails to a Distribution List named DL_Vendor_Prod_Team instead of to a list of mail id's.
Please, can anyone give me some idea or light into this issue so that i can send mail to the distribution list using mailx.


My current code is like:
------------------------

CONTENT="Content of the mail"
SUBJECT="Subject of the mail"
while read mail_address
do

echo $CONTENT | mailx -s "$SUBJECT" $mail_address

done < notifylist.lst


Thanks in advance,
Awaiting for your reply

Naren


All times are GMT -5. The time now is 06:24 PM.