Some SpamAssassin tests use the mail headers, so they're sort of required. At least, without them, your results will be a lot less accurate.
I'd suggest the easiest approach is to stuff the HTML documents into an email. This is pretty easy to do with a trivial shell script. Note this and the next example use
flip (which you may have to install) to convert to email's CRLF line endings. You could also use
sed, I suppose. Or maybe it's fine without it.
cat <<HEADER - in/message.html | flip -m > out/message.eml
From: "Your Company Name" <firstname.lastname@example.org>
To: "Your Name" <email@example.com>
Date: $(date -R)
Content-type: text/html; charset=utf-8
Subject: Your Subject Here
Downside, that leaves you with a non-MIME HTML-only message. You may have to disable a SpamAssassin rule which will dock your message for being HTML-only.
Another option is the
mime-construct utility, which again you may have to install. Then you'd do:
mime-construct --to '"Your Name" <firstname.lastname@example.org>' \
--subject "Your Subject Here" \
--header 'From: "Your Company Name" <email@example.com>' \
--header "Date: $(date -R)" \
--multipart 'multipart/alternative' --output \
--type 'text/plain; charset=utf-8' --file in/message.txt \
--type 'text/html; charset=utf-8' --file in/message.html \
| flip -m - > out/message.eml
You could use
lynx -dump to make your plain-text alternative (e.g.,
lynx -dump in/message.html > in/message.txt)
You should then be able to run the generated file through SpamAssassin as an email.
It should go without saying that you need to follow other email best practices (confirmed opt-in, easy ubsubscribe, etc.).