![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| to send email to multiple users | vishwas.shenoy | UNIX for Dummies Questions & Answers | 0 | 01-25-2008 03:00 AM |
| How to send an email? | aajan | UNIX for Dummies Questions & Answers | 1 | 06-12-2007 01:53 AM |
| Using mailx to send email to multiple users. | priyaksingh | Shell Programming and Scripting | 4 | 02-20-2006 10:37 PM |
| Send email where # is in the email address - Using Unix | jingi1234 | UNIX for Dummies Questions & Answers | 1 | 05-23-2005 08:23 AM |
| Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win) | Vetrivela | UNIX for Advanced & Expert Users | 2 | 02-15-2005 07:43 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
send email to more users
Hi,
If I want to send an email to serveral users, what is the correct way to do it? I know a little bit mail command. If I want to send email to John and Scott after UNIX shell scripts have completed the job. I type: mail -s 'Job has been completed successfully' john@yahoo.com < log.txt I also want the same email go to Scott. What to do? Type another mail command or add Scott@hotmail.com after John's email address? Please help. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Just enclose the list of email addresses in quotes. Where it's a message to one person and copied to other(s) then you can use the -c "list" instead.
cheers |
|
#3
|
|||
|
|||
|
thestevew:
Thanks. Where do I put this list of email address? Should I type: mail -s 'xxxxxxxx' "email1, email2, email3" -c "list" < log.txt Please be specific. |
|
#4
|
|||
|
|||
|
space seperated entries and not comma seperated entries,
Code:
mailx -s "<subject>" "<addr1> <addr2>" < log.txt |
|
#5
|
|||
|
|||
|
matrixmadhan:
Thanks for your advice. I have tried with your syntax. It didn't work. My original syntax is like this: mail -s ' xx data loading is successful.' email@yahoo.com < loading.log exit 1 Could you show your syntax here? Thanks a lot. |
|||
| Google The UNIX and Linux Forums |