On Aug 30, 2007, at 5:01 PM, L Goodwin wrote:
Chuck, I'd prefer to have the script handle the
mailing  so I can test the script (with email send)
manually, independent of cron.

Still looking for specifics on setting this up and a
bourne shell script example that sends an email.
Thanks!

I just ran this:

        -------

#! /bin/sh

SENDMAIL=/usr/libexec/sendmail/sendmail

rm -f /tmp/$$.msg
touch /tmp/$$.msg
echo 'From: Chuck <[EMAIL PROTECTED]>' >> /tmp/$$.msg
echo 'To: [EMAIL PROTECTED]' >> /tmp/$$.msg
echo 'Subject: test message via a shell script' >> /tmp/$$.msg
echo >> /tmp/$$.msg
echo 'A test message body.' >> /tmp/$$.msg
echo >> /tmp/$$.msg
cat mailout.sh >> /tmp/$$.msg
echo >> /tmp/$$.msg
echo '-- ' >> /tmp/$$.msg
echo '-Chuck' >> /tmp/$$.msg

$SENDMAIL -i -t < /tmp/$$.msg
rm /tmp/$$.msg

        -------

If we're lucky, you just got emailed the content of the script above. :-)

--
-Chuck

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to