Hi,
this is really useful!!!!!
Could you help me a little more to understand the syntax?
It's not clear to me what "cat <<Z" and "Z" do!

In addition to that ... what do I need to configure to let this work? I'm
not able to run it on all my desktops so probably something is set
different! I get no error but I do not receive the mail!

Thanks!!

Bye...


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:owner-
> [EMAIL PROTECTED] On Behalf Of John Summerfield
> Sent: Friday, July 13, 2007 00:30
> To: [EMAIL PROTECTED]
> Subject: Re: Mail from a script
> 
> Manuel Mussini wrote:
> > Hi,
> >
> > is there a way to send an email from a bash script?
> >
> > I mean . I have a script that manages some jobs that need many days to
> > complete (they run locally on my desktop!)! I'd like to receive some
> emails
> > containing the status of the job! Just like CAF's endjob mails!
> >
> > Is it possible?
> 
> This doesn't give any control over the from: field; it's simply piped
> into sendmail. It mirrors what crond and atd do.
> 
> echo -e 'Love\n\tMaria' \
>       | mail -s "Message for Manuel" [EMAIL PROTECTED]
> 
> The following gives complete flexibility and is what I often do to send
> reports. Note that I have two sections here, one sending out the headers
> (including the needed blank line), one creating the actual report. This
> mirrors what is often needed in practice.
> 
> (
> cat <<Z
> To: [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> Subject: Message from Maria
> 
> Z
> echo Thanks so much for last night
> echo
> echo Love
> echo -e \ Maria
> ) 2>&1 \
>   | /usr/sbin/sendmail -t
> 
> 
> 
> --
> 
> Cheers
> John
> 
> -- spambait
> [EMAIL PROTECTED]  [EMAIL PROTECTED]
> 
> Please do not reply off-list

Reply via email to