I do have full control over my system.

I want to use the mail command so that the script will be more portable.
This script will run on an OS X system that has PostFix running on it, but
if I were later to run it on Linux with another email server, then the
script would still send out emails without needing to change things around.
I also didn't want to have to install other software for the same reason.

As it turns out, my script works. Just not on my laptop that I created it
on. Don't know why. I have just ran upgrades for 2 years, and this is
another sign that I need to do a clean install. Here is the script that I am
using if anyone has forgot.

#! /bin/bash

echo "Email message body here." | /usr/bin/mail -s "Email subject"
mtuller at ce.anoka.k12.mn.u


Thanks all for the help.


Mike



On 10/23/04 1:35 PM, "nate at refried.org" <nate at refried.org> wrote:

> On Sat, Oct 23, 2004 at 10:35:20AM -0500, Mike Miller wrote:
>> On Sat, 23 Oct 2004 nate at refried.org wrote:
>>> If you run this from cron, any output is usually sent in a mail to the
>>> user that owns the cron job.  If you're running this as root, just
>>> forward the mail from root to your email address.
>> 
>> That applies to stdout and stderr, but if there is no such output, no mail
>> is sent.  If the cron job is a script that sends an e-mail message, it
>> should send that message to the adressee, not to the owner of the cron
>> job.
> 
> It sounded to me like Mike had full control over the system he was
> running backups on.  If he changed the script to output a message the
> email part would be taken care of for him.
> 
> If he wants the mail to go somewhere else than the account running the
> cron job, there are many ways to redirect the cron email to the correct
> address.
> 
> I just wanted to make it clear there might be other ways to get the end
> result he wants.
> 
> Nate
> 
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> Help beta test TCLUG's potential new home: http://plone.mn-linux.org
> Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
> tclug-list at mn-linux.org
> https://mailman.real-time.com/mailman/listinfo/tclug-list



_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list