function gdpr_tasks_mail in General Data Protection Regulation 7
Implements hook_mail().
File
- modules/
gdpr_tasks/ gdpr_tasks.module, line 274 - Module file for the GDPR Tasks module.
Code
function gdpr_tasks_mail($key, &$message, $params) {
$context = $params['context'];
$options = array(
'clear' => TRUE,
);
$message['to'] = token_replace($message['to'], $context, $options);
$message['subject'] = token_replace($context['subject'], $context, $options);
$message['body'][] = token_replace($context['body'], $context, $options);
$message['params']['plaintext'] = token_replace($params['plaintext'], $context, $options);
}