title: How to apply template (tpl) file for email message body
body: <p>I've this mail function in my custom module</p>
  
  <pre><code>function mymodule_mail($key, &amp;$message, $params) {
    switch ($key) {
      case 'notification':
        $message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed';
        $message['subject'] = $params['subject'];
        $message['body'] = t('&lt;table style="border:2px solid black;"&gt;&lt;tr&gt;&lt;td&gt;MESSAGE BODY &lt;/td&gt;&lt;td&gt;&lt;b&gt;'.$params['msg'].'&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;');
        break;     
    }
  }
  </code></pre>
  
  <p>Here you can clearly see that for message body i'm using some html tags.</p>
  
  <p>Below code invoke the mail function, which is written in my block.</p>
  
  <pre><code>$params = array(
        'subject' =&gt;  'email subject',
        'msg' =&gt; 'message body',
  );
  drupal_mail('mymodule', 'notification', 'email address', language_default(), $params);
  </code></pre>
  
  <p>I want to know, is there any easy way to apply a template (.tpl.php) file for my message body so that i can put my all css styling within that tpl file. </p>
  
  <p>Any suggestion would be greatly appreciated.</p>