星期五, 十月 13, 2006

Linux用Sendmail 发送 附件

非常Cool脚本。

#!/bin/sh
From="sunose@g.com"
To="sunose@g.com"
Subject="Sendmmail with attachment use uuencode"
(
echo "Subject: $Subject"
echo "body"
echo ""
uuencode $1 $1
) | /usr/sbin/sendmail -f$From $To
exit 0