On Tue, 20 Sep 2005, Ow Mun Heng wrote:
> I did it, didn't have to go through perl. Just added a mail_header() to
> my script.
> mail_header()
> {
> echo "MIME-Version:1.0"
> echo "From:[EMAIL PROTECTED]"
> echo "To:$RECIPIENT"
> echo "Subject:Quotes $DATE"
> echo "Content-Type: text/html"
> echo
> }
>
> and then I added a script for cron
> #!/bin/sh
> #
> TEMPFILE="/tmp/file.$$"
> PORTFOLIO_SCRIPT=$HOME/scripts/portfolio.sh
>
> $PORTFOLIO_SCRIPT --html > $TEMPFILE 2>/dev/null>&1
> && /usr/sbin/sendmail -t < $TEMPFILE && rm $TEMPFILE
>
> Next, I think the above code can be enhanced by not using a tempfile.
> perhaps a < EOF
You could probably use a HERE document.
http://www.tldp.org/LDP/abs/html/here-docs.html
--
--
[email protected] mailing list