Send email with html formatting using mail/mailx commands (Centos 7)

Hello everyone,

I am trying to send email containing html formatting with the mail / mailx command but I can’t make it work.
For some other issues I can’t use the sendmail command, at least for now.


OS: CentOS Linux release 7.9.2009 (Core)
mail/mailx version: 12.5 7/5/10

I can’t find anything that works on google. Can anyone who have done something similar help me?
Thank you