Send email with html template programmatically On board:


Drupal 7
Mail System
Mime Mail


mimemail-message.tpl.php is configurated

E-mails sends by Rules with HTML template, but template not used when it call programmatically:

$mail = array(
  'subject' =&gt; 'Test e-mail',
  'message' =&gt; '
    &lt;p&gt;Lorem &lt;a href="http://google.com"&gt;ipsum dolor sit amet&lt;/a&gt;, consectetuer &lt;b&gt;adipiscing&lt;/b&gt; elit, sed &lt;i&gt;diam&lt;/i&gt; nonummy &lt;s&gt;nibh&lt;/s&gt; euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.&lt;/p&gt;
  ',
);
drupal_mail('system', 'mail', 'to@example.com', language_default(), array('context' =&gt; $mail));
In the mimemail-message.tpl.php info you can read


  Copy this file in your default theme folder to create a custom themed
  mail.
      Rename it to mimemail-message--[module]--[key].tpl.php to override it for a
      specific mail.


Try to change your tpl name from 
mimemail-message.tpl.php to mimemail-message--system.tpl.php