Last active
August 29, 2015 13:57
-
-
Save rabellamy/9673149 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
class ContactFormMailSystem extends DefaultMailSystem { | |
public function format(array $message) { | |
$message['body'] = implode("\n\n", $message['body']); | |
$message['body'] = drupal_wrap_mail($message['body']); | |
return $message; | |
} | |
} | |
/** | |
* Implements hook_mail(). | |
* @param $key | |
* @param $message | |
* @param $params | |
*/ | |
function HOOK_mail($key, &$message, $params) { | |
$language = $message['language']; | |
switch ($key) { | |
case 'HOOK_email': | |
$message['headers']['Content-Type'] = 'text/html; charset=UTF-8;'; | |
$message['subject'] = t('YOUR SUBJECT'); | |
$message['body'][] = $params['body']; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment