Send Email to group ids

hi,

I want to send mail to DL...
i am sending email to single id using mailx .. how to send to group of ids? :confused:
i am using a file which conatins all the ids,
is there any other way to send mail without creating the DLfile?

   
  DL=path\file.txt
  mailx -s  "Info BG is now running " `cat $DL` < file.txt

Please help me...

You can send emails to multiple ids as follows

Code:
mailx -s "subject" id1 id2 .. idn < inpfile.txt

acutally i have many ids can't mention them in the code
is there any other way???

There is another way of doing it ...just mention the alias name in your mailx statement instead of actually mentioning the all id's that can complex your statement. Actual entry for your id's can be done in .mailrc file which will be at your home directory.

Ex:--

mailx -s "<subject>" <aliasname> #This is your mailx statement.

alias <aliasname> <your id's list comma separated.......> #this should be entry in your .mailrc file at your home dir.

Thank You:)