How to send html-formatted email

Short answer: sending .html-formatted email is rather easy, even from a local laptop. But there can be difficulties, which are not avoided easily. To begin with, the short and (hopefully) working answer:

Mac OS | CentOS | Debian

cat letter.html | mail -s "$(echo -e "Testing email\nContent-Type: text/html")" login@example.com

Make sure you check the SPAM folder, as it has nearly 0 chance of getting through to your mailbox from scratch. If it doesn’t work out, you’ll have to go deeper.

…