Full ELMS Learning Network documentation
function email_mail
cis7 email.module | email_mail($key, &$message, $params) |
cle7 email.module | email_mail($key, &$message, $params) |
elmsmedia7 email.module | email_mail($key, &$message, $params) |
icor7 email.module | email_mail($key, &$message, $params) |
meedjum_blog7 email.module | email_mail($key, &$message, $params) |
mooc7 email.module | email_mail($key, &$message, $params) |
Implements hook_mail().
File
- sites/
all/ modules/ ulmus/ email/ email.module, line 452 - Module file for the email module, which creates a email address field.
Code
function email_mail($key, &$message, $params) {
$language = $message['language'];
switch ($key) {
case 'contact':
// Compose the body:
$message['body'][] = t('@name sent a message using the contact form at @url.', array('@name' => $params['name'], '@url' => $params['url']), array('langcode' => $language->language));
$message['body'][] = $params['message'];
$message['subject'] = "";
// Include the title of the entity, if one exists
$object = $params['object'];
if (isset($object->title) && !empty($object->title)) {
$message['subject'] = "[" . check_plain(preg_replace("/\r|\n/", '', $object->title)) . "]";
}
$message['subject'] .= " " . check_plain($params['subject']);
break;
}
}