Solved! Go to Solution.
Hi @mythili
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