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' => 'Test e-mail',
  'message' => '
    <p>Lorem <a href="http://google.com">ipsum dolor sit amet</a>, consectetuer <b>adipiscing</b> elit, sed <i>diam</i> nonummy <s>nibh</s> euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
drupal_mail('system', 'mail', '[email protected]', language_default(), array('context' => $mail));

enter image description here enter image description here

  • Did you receive any solution for this? Commented Mar 15, 2017 at 11:47

1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.