html formatted email using form api I have created my contact us module using form api, email is successfully generated and send to my specified email address, but I need body of the email to b html formatted, for this I have created another file mymodule.install in my module folder and add the below code:

function mymoduleenable() {
 $current = variable_get('mail_system', array('default-system' =&gt;    'DefaultMailSystem'));
 $addition = array('mymodule' =&gt; 'mymoduleMailSystem');
 variable_set('mail_system', array_merge($current, $addition));
}

function mymoduledisable() {
 $mail_system = variable_get('mail_system', array('default-system' =&gt; 'DefaultMailSystem'));
 unset($mail_system['mymodule']);
 variable_set('mail_system', $mail_system);
}


and in my mymodule.module

 class mymoduleMailSystem extends DefaultMailSystem {
 public function format(array $message) {
 $message['body'] = implode("\n\n", $message['body']);
 $message['body'] = drupal_wrap_mail($message['body']);
 return $message;
 }
}


but due to above all piece of code I am unable to receive email, kindly suggest any solution.
Same thing i do in my module may be it is set to you requirement 

    global $content;
    $content .= '&lt;button class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-lg"&gt;Apply&lt;/button&gt;';
    $content .= '&lt;div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"&gt;';
    $content .= '&lt;div class="modal-dialog modal-lg"&gt;';
    $content .= '&lt;div class="modal-content"&gt;';
    $content .= drupal_render($form);
    $content .= '&lt;/div&gt;';
    $content .= '&lt;/div&gt;';
    $content .= '&lt;/div&gt;';
    return $content;