You are here

function user_relationship_mailer_mail in User Relationships 7

Same name and namespace in other branches
  1. 6 user_relationship_mailer/user_relationship_mailer.module \user_relationship_mailer_mail()

Implements hook_mail().

File

user_relationship_mailer/user_relationship_mailer.module, line 97
Handles email notifications when relationships are added or removed.

Code

function user_relationship_mailer_mail($op, &$message, $replacements) {
  $defaults_function = "user_relationship_mailer_{$op}_default";
  $defaults = $defaults_function();
  $message['subject'] = t(variable_get("user_relationship_mailer_{$op}_subject", $defaults['subject']), $replacements);
  $message['body'] = array(
    t(variable_get("user_relationship_mailer_{$op}_message", $defaults['message']), $replacements),
  );
}