how to send mail without human intervention?
Wil McGilvery
wmcgilvery
Mon May 17 11:37:59 PDT 2004
Are you using Mailx?
I thought mailx was intended for use within scripts.
hth
Wil
http://www.mkssoftware.com/docs/man1/mailx.1.asp
-----Original Message-----
From: Net Llama! [mailto:netllama at linux-sxs.org]
Sent: Sat 9/21/2002 2:51 AM
To: linux-users at linux-sxs.org
Cc:
Subject: Re: how to send mail without human intervention?
grrr...i hate it when i do this. ok, i figured out a workaround
(although not what i'd call ideal). I can redirect the contents of a
file into that mail command like so:
mail -n -s "another test of mail" netllama at linux-sxs.org < /tmp/whatever
i just wish there was a way to just specify the body somehow. oh well.
Net Llama! wrote:
> I'm writing a bash script where I need to send email out depending on
> certain conditions within the script.
>
> I'm thought that I could use 'mail' to do the job, but it seems to
> require human intervention to send the message out. I'm trying:
> mail -n -s "another test of mail" netllama at linux-sxs.org
>
> yet it keeps insisting on having me type something for the body, and
> then hit Ctrl-D or a . at the end in order to send it. Looking at the
> man page for mail there doesn't seem to be any option that lets me set
> the body message from the command itself. Am i missing something
> obvious, or is there a better tool for the job? thanks!
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman netllama at linux-sxs.org
Linux Step-by-step & TyGeMo: http://netllama.ipfox.com
11:50pm up 46 days, 8:10, 5 users, load average: 0.10, 0.06, 0.01
_______________________________________________
Linux-users mailing list
Linux-users at linux-sxs.org
Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5758 bytes
Desc: not available
Url : http://mail.linux-sxs.org/pipermail/linux-users/attachments/20020921/5817a944/attachment.bin
More information about the Linux-users
mailing list