#
# $Id$
+#
+# Important note: this program requires the FreeBSD version of
+# calendar. The OpenBSD version uses incompatible commandline
+# options and doesn't provide features used by this program.
+#
+
opt_subject="Calendar for"
opt_dateform="%B %d"
opt_to=$LOGNAME
usage()
{
- echo "mail-calendar [-h|--help] [-l|--lang locale] [-t|--to addr] [-a|--advance]"
+ echo "mail-calendar [-h|--help] [-l|--lang locale] [-t|--to addr] [-a|--advance days]"
}
# Parse arguments
(
echo "Subject: $opt_subject $s_date"
echo "To: $opt_to"
+ echo "Content-Type: text/plain; charset=iso-8859-1"
+ echo "Content-Disposition: inline"
+ echo "Content-Transfer-Encoding: 8bit"
echo
- calendar -l 0 -w 0 -t $c_date
+ cat $tmp
) | /usr/sbin/sendmail "$opt_to"
fi