LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-11-2004, 02:50 AM   #16
aLiVe
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0

Sorry frob23, need your help again. What must i add to the script to notify me thru email (mayb a message of our choice) after it had done the things above?
I have tried this which i found on the web:
/usr/sbin/sendmail -t <<EOF
To: <receipients>
From: <me>
Cc: <more guys>
<and some more>
Bcc: <Guys you won't see>
Subject: Whatever

The message

EOF
 
Old 08-11-2004, 03:02 AM   #17
aLiVe
LQ Newbie
 
Registered: Jul 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I found one more that worked but with no subject and cannot see is to who.

echo " The Message" | sendmail -f <sender> <recipient>

Any idea how to add suject and show the recipient email address?
 
Old 08-11-2004, 05:55 AM   #18
liinux
LQ Newbie
 
Registered: Aug 2004
Location: US
Posts: 27

Rep: Reputation: 16
cron can be set up to automatically mail after the job is done
add a mailto: entry
 
Old 08-12-2004, 10:37 AM   #19
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Ubuntu, FreeBSD
Posts: 1,449

Rep: Reputation: 48
To send mail I usually use the mail command. It is Fairly simple to use. And fits into a script well.

Code:
mail -s "This is my subject" -b "let's bcc some people here" -c "we'll CC some people in here" thisis@whoIamsendingit.too <<EOF
here I type
the many lines of the message
followed by a . on a line by itself.
.
EOF
Sorry about the delay... I totally missed when this came up again.

Last edited by frob23; 08-12-2004 at 10:40 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 03:14 AM
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 04:32 PM
Shell scripting pros herve2001 Linux - Newbie 2 02-24-2005 02:13 PM
Need help from pros in shell script aLiVe Programming 1 08-08-2004 05:50 AM
Shell Scripting, I think... AMDPwred Linux - General 1 04-06-2002 01:01 AM


All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration