[ale] Mailing from Shell Script

Michael H. Warfield mhw at wittsend.com
Mon Aug 21 16:19:26 EDT 2000


On Mon, Aug 21, 2000 at 04:17:07PM -0400, Jeff Hubbs wrote:
> I'm trying to send an e-mail from within a bash script and I'm not sure what
> to use.  The mailer needs to be able to send a preset message to a mail
> server on the local network for relaying to the Internet.  I have already
> gotten pine to work but it appears to want to use its built-in editor and I
> see no option in the man page for getting around it.  

> The command I'm envisioning would look something like this:

> 	$ mail_command -s <subject> -r <recipient list> -f <msg text file>

> Presume that  mail_command can be configured with the IP address of the
> local mail server.  

> Any suggestions?

	This what I use...

/usr/sbin/sendmail -t <<EOF
To: <receipients>
From: <me>
Cc: <more guys>
	<and some more>
Bcc: <Guys you won't see>
Subject: Whatever

The message


EOF


> - Jeff

	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw at WittsEnd.com
  (The Mad Wizard)      |  (678) 463-0932   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list