You are here

apply_for_role.module in Apply for role 8

File

apply_for_role.module
View source
<?php

/**
 * Implements hook_mail().
 *
 * Purpose: Establish a mailer for sending out messages from apply for role.
 */
function apply_for_role_mail($key, &$message, $params) {
  switch ($key) {
    case 'apply_for_role':
      $message['from'] = \Drupal::config('system.site')
        ->get('mail');
      $message['subject'] = $params['subject'];
      $message['body'][] = $params['body'];
      break;
  }
}

Functions

Namesort descending Description
apply_for_role_mail Implements hook_mail().