1

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', 'to@example.com', language_default(), array('context' => $mail));

enter image description here enter image description here

  • Did you receive any solution for this? – Gaurav Singh Mar 15 '17 at 11:47
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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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