Send Email to group ids

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Send Email to group ids
# 1  
Old 07-29-2010
Send Email to group ids


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

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

Please help me...

Last edited by sreelu; 07-29-2010 at 02:52 AM..
# 2  
Old 07-29-2010
Send Email to group ids

You can send emails to multiple ids as follows

mailx -s "subject" id1 id2 .. idn < inpfile.txt
# 3  
Old 07-29-2010
acutally i have many ids can't mention them in the code
is there any other way???
# 4  
Old 07-29-2010
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.


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.
# 5  
Old 07-29-2010
Thank YouSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Email IDs added to .mailrc aliases not receiving mails

hi, I added an email id to a list of existing aliases in .mailrc on my unix box, using vi editor. However, the new id has not been receiving any mails from the box. Kindly help as to what needs to be done here. Does the box need to be rebooted for these changes to reflect? Is there any other... (5 Replies)
Discussion started by: qwerty000
5 Replies

2. Emergency UNIX and Linux Support

Email ids from gecos

I would like to extract only the email ids from the gecos of each user id. I have to get the email ids of all the users on the server like this. Can someone please assist me with the command/script? (15 Replies)
Discussion started by: ggayathri
15 Replies

3. Shell Programming and Scripting

How to send mails based on email ids residing in table?

Hello Gurus, I have one table which consists of two field:- PROG_NAME EMAIL xxxx email1,email2,email3 yyyy email4,email1,email2 I want to to send mails by using mailx command. But how do I get each and every mail ids from table against... (4 Replies)
Discussion started by: pokhraj_d
4 Replies

4. UNIX for Dummies Questions & Answers

Email ids trucated in Mailx function

I wanted to send email to list of people using mailx in unix. I am getting the emailds from a oracle table and getting the ids in a variable. Shell script is shown below: ----------------------------------------------------------------------- filename=testdata921 export filename... (5 Replies)
Discussion started by: sasi02
5 Replies

5. UNIX for Dummies Questions & Answers

new to ldap, send email to a ou or group, and see a list from email client

hi, i'm running openldap on ubuntu 10.04, creating new items with apache directory studio (windows version). i use the ldap just as an address book to our small office (email clients are windows live mail 2009, 2011, microsoft outlook 2007 and 2010). a. i cant see a list of the contacts,... (0 Replies)
Discussion started by: V4705
0 Replies

6. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

7. Shell Programming and Scripting

Send a mail to IDs listed in a text file

I have a list of mail ids in text file and want a ksh script that reads this text file and sends a mail to all mail ids with same subject line and content. I am using UX-HP machine and KSH. Thanks for help in advance! (5 Replies)
Discussion started by: Sriranga
5 Replies

8. HP-UX

Sending email to multiple IDs

Hi, I am trying to send an email to multiple IDs from Unix script. I have given the EmailIds in a file and trying to use the file as input in the script. > cat Email EmailID = "" In my script I have . /Email mailx -s "subj" $EmailID This fails with the... (3 Replies)
Discussion started by: sangharsh
3 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Please list email ids or contact info of members

Hi , Is it possible to list the user's email id for further communication. Thanks, MoonwalaPL (3 Replies)
Discussion started by: moonwalapl
3 Replies

10. UNIX for Advanced & Expert Users

Script which can send file to diffrent mail ids.

Hi i am looking for the script which can send file to different mailids, please halp me out. Thanks in advance. (3 Replies)
Discussion started by: vpandey
3 Replies
Login or Register to Ask a Question

Featured Tech Videos