[ydl-gen] Sending mail from the command line

Joseph E. Sacco, Ph.D. joseph_sacco at comcast.net
Thu Sep 7 08:52:22 MDT 2006


Geert,

You are welcome.  

I use constructs like that within a crontab file to email the output of
some command.

On another subject... 

Good to see the list is coming alive once again.  Can a new release be
far behind??? [:-)]


-Joseph


===================================================================
On Thu, 2006-09-07 at 16:40 +0200, Geert Janssens wrote:
> Indeed, even simpler than using sendmail directly.
> 
> Thanks Joseph !
> 
> Geert
> 
> On Thursday 07 September 2006 16:27, Joseph E. Sacco, Ph.D. wrote:
> > Of course, a pipe should work, assuming sendmail is running. Here is an
> > example:
> >
> >     % ls | mail -s "output of ls"  jsacco > /dev/null 2>&1
> >
> > -Joseph
> >
> > ===================================================================
> >
> > On Thu, 2006-09-07 at 09:53 -0400, Joseph E. Sacco, Ph.D. wrote:
> > > Why not route root's main to yourself:
> > >
> > > As root:
> > >
> > > (1) open /etc/aliases in your favorite editor
> > >
> > > (2) add/edit the following lines at the bottom of the file
> > >
> > >         # Person who should get root's mail
> > >         root:           your-user-name
> > >
> > > (3) run the command
> > >
> > >    newaliases
> > >
> > > (4) test
> > > send root some email
> > >
> > > -Joseph
> > >
> > > ============================================================
> > >
> > > On Thu, 2006-09-07 at 09:35 -0400, Eric Dunbar wrote:
> > > > Hello all, I've been trying to figure out how to send an e-mail using
> > > > a tcsh script. I've created a script to monitor my server's IP and
> > > > update the DNS server when it changes (I'm on dynamic IP).
> > > >
> > > > I want to send myself an e-mail whenever it has to update the DNS
> > > > server (at present it sends root an e-mail but I don't check my root
> > > > e-mail that frequently).
> > > >
> > > > I've been trying to use mail to send an e-mail but cannot automate the
> > > > process:
> > > >
> > > > mail -s My\ subject my.email at nowhere.com
> > > >
> > > > At first I tried piping a file into the command but haven't got that
> > > > to work (composing the e-mail requires one to press ^D to terminate
> > > > the e-mail followed by an enter to accept no cc:).
> > > >
> > > > Any ideas? Is there another mechanism I should be using to email stuff
> > > > automagically? Is there an interface to send mail I should be using?
> > > >
> > > > Thanks, Eric.
> > > > _______________________________________________
> > > > yellowdog-general mailing list
> > > > yellowdog-general at lists.terrasoftsolutions.com
> > > > http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> > > > HINT: to Google archives, try  '<keywords> site:terrasoftsolutions.com'
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general at lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> HINT: to Google archives, try  '<keywords> site:terrasoftsolutions.com'
-- 
joseph_sacco [at] comcast [dot] net



More information about the yellowdog-general mailing list