PS: There is no reason why mime mail module should not work for you. We remember your earlier queries related to mime mail where you have mentioned it’s not working for you. I believe it’s due to your setup / configuration. Get a Drupal Expert to fix the issues.
Using rules is alternate way to do things programmatically, it is simply a combination of event,condition and action what we basically do in custom module implementing hooks.
As @Anil Sagar has shared the link of sending html mails with rules module that should work for you and also that will make sure of leveraging features we already have in the system.
But if for specific reason you want to do this with custom module, drupal_mail is the drupal api for sending emails programmatically and it goes well with mime module. You can find an example here