The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
to send email to multiple users vishwas.shenoy UNIX for Dummies Questions & Answers 0 01-25-2008 06:00 AM
How to send an email? aajan UNIX for Dummies Questions & Answers 1 06-12-2007 04:53 AM
Using mailx to send email to multiple users. priyaksingh Shell Programming and Scripting 4 02-21-2006 01:37 AM
Send email where # is in the email address - Using Unix jingi1234 UNIX for Dummies Questions & Answers 1 05-23-2005 11: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 10:43 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-21-2006
duke0001 duke0001 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 131
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.
  #2 (permalink)  
Old 03-21-2006
thestevew thestevew is offline
Registered User
  
 

Join Date: Mar 2006
Location: South Yorkshire, UK
Posts: 114
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 (permalink)  
Old 03-21-2006
duke0001 duke0001 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 131
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 (permalink)  
Old 03-21-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
space seperated entries and not comma seperated entries,
Code:
mailx -s "<subject>" "<addr1> <addr2>" < log.txt
please search the forum
  #5 (permalink)  
Old 03-21-2006
duke0001 duke0001 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 131
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0