Stupid scripting question -- FAQ-ish

Net Llama! netllama
Mon May 17 11:43:15 PDT 2004


A non-sendmail specific version:
mail -s "GNUCash update" tim at thewunders.org < "message f00"



On Mon, 20 Jan 2003, Tim Wunder wrote:

> On 1/20/2003 11:28 AM, someone claiming to be Roger Oberholtzer wrote:
> > On Mon, 20 Jan 2003 11:09:52 -0500
> > Tim Wunder <tim at thewunders.org> wrote:
> >
> >
> >>Hi,
> >>I have a rudimentary script that checks out and compiles the latest
> >>GNUCash from CVS. I'd like to have it send me an e-mail when it
> >>completes telling me that the new GnuCash is ready for installation, or
> >>that the update failed.
> >>
> >>So, essentially, my question is: How do I send a mail message from the
> >>command line without requiring additional user input?
> >>
> >>A quick search on google hasn't yielded much help for me (probly not
> >>using the right search terms).
> >
> >
> > How about this?
> >
> > cat << *EOF* | sendmail -N failure -n -R hdrs -U -fme at here -- you at there
> > Subject: GNUCash update
> > It is finished
> > *EOF*
> >
> >
> > The *EOF* are literal strings and can be anything. You can also cat a file
> > or echo text. Whatever makes you happy. The 'secret' is in the options to
> > sendmail.
> >
> > This example is sent from me at here to 'you at there'. There can be more. It
> > works for all users who can send mail.
> >
> > You may need to replace 'sendmail' with '/usr/sbin/sendmail' or wherever
> > sendmail is.
> >
> >
>
> Cool. Thanks. BTW, my sendmail complained about the -U
> (sendmail-8.12.5-7, RH 8.0), I removed it and it worked. Now to figger
> out how to include the contents of an environment variable in the script
> and make it so the To: doesn't get displayed as
> "undisclosed-recipients"... Hopefully, 'man sendmail' will help ;-)
>
> Thanks again,
> Tim
>
>
> _______________________________________________
> Linux-users mailing list
> Linux-users at linux-sxs.org
> Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users
>

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lonni J Friedman				netllama at linux-sxs.org
Linux Step-by-step & TyGeMo		     http://netllama.ipfox.com


More information about the Linux-users mailing list