#!/usr/local/bin/perl
require "weblib.lib";
&ReadParse;
&htmlopen("Send HTML Mail");
print <<EOF;
This web page allows you to send HTML-formatted mail to anyone who has the 
capability of reading and formatting it
<form action=$weblib::URL method=POST>
<table>
<tr><td>From:</td><td><input name=From size=72></td></tr>
<tr><td>To:</td><td><input name=To size=72></td></tr>
<tr><td>Subject:</td><td><input name=Subject size=72></td></tr>
<tr><th colspan=2>Message (as HTML)</th></tr>
<tr><td colspan=2><textarea name=Message rows=20 cols=80></textarea></td></tr>
</table>
<input type=submit name="Mail It!">
</form>
EOF
if($in{Message}){
	open(MAIL,"|/usr/lib/sendmail -t");
print MAIL <<EOF;
From: $in{From}
To: $in{To}
MIME-Version: 1.0
Content-type: text/html
Subject: $in{Subject}

$in{Message}
EOF
	close(MAIL);
}
&htmlclose;
