Re: Configuring FreeBSD 6.2 to use sendmail for sending only
- From: Chuck Swiger <cswiger@xxxxxxx>
- Date: Thu, 30 Aug 2007 17:19:04 -0700
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 <cswiger@xxxxxxx>' >> /tmp/$$.msg
echo 'To: xrayv19@xxxxxxxxx' >> /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@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- References:
- Re: Configuring FreeBSD 6.2 to use sendmail for sending only
- From: L Goodwin
- Re: Configuring FreeBSD 6.2 to use sendmail for sending only
- Prev by Date: Re: FreeBSD Hostname Question - Whats The Proper Way
- Next by Date: Re: Configuring FreeBSD 6.2 to use sendmail for sending only
- Previous by thread: Re: Configuring FreeBSD 6.2 to use sendmail for sending only
- Next by thread: Re: Configuring FreeBSD 6.2 to use sendmail for sending only
- Index(es):
Relevant Pages
|
|