You are here

function rules_mail in Rules 6

Same name and namespace in other branches
  1. 8.3 rules.module \rules_mail()
  2. 7.2 modules/system.eval.inc \rules_mail()

Implementation of hook_mail().

Set's the message subject and body as configured in the $settings of the action.

Related topics

File

rules/modules/system.rules.inc, line 125
rules integration for the system module

Code

function rules_mail($key, &$message, $settings) {
  $message['subject'] .= str_replace(array(
    "\r",
    "\n",
  ), '', $settings['subject']);
  $message['body'][] = $settings['message'];
}