How do I send HTML email?
This really depends on what you want to do. At its base, swaks is agnostic about what it sends in its DATA section, so you can craft whatever email you want and use it as the DATA of the message using the --data option. This is the best route for testing, where you usually have a fixed set of test cases to run, or you want to run the same command many times. If you don't know what a raw email looks like, send yourself an email to a gmail account and select "Show Original". The entire text file is the format that the --data option expects (though it will probably be more complicated and have more headers than you need)
On the other hand, if you're trying to do something like use swaks to send an email copy of a nightly HTML file, and you want the file to show up correctly in your MUA, swaks does have a couple of helper options.
First, if you want the HTML file to be an attachment that can be openable or saveable from your MUA, you want the --attach option. For instance, the following command will attach the file report.html. --attach-type is optional, but setting it will help your MUA know what to do with the attachment:
swaks --attach-type text/html --attach report.html
Another interpretation of this question is "How do I send email which has an HTML-encoded body". This means sending an email that your MUA will display as HTML. swaks always treats the "body" portion of a MIME email as text/plain, so you have to "cheat" and add the MIME headers yourself. The following should work:
swaks --body report.html --add-header "MIME-Version: 1.0" --add-header "Content-Type: text/html"
One potential issue with this path is that the contents of report.html won't be encoded as they would if it was processed using --attach. Whether this will be an issue or not depends on the contents of the file, the mail server(s) used to handle the mail, and the MUA used to view the mail