You are here

function mimemail_rules_action_mail_to_user_upgrade in Mime Mail 7

Implements hook_rules_action_base_upgrade().

File

./mimemail.rules.inc, line 246
Rules actions for sending Mime-encoded emails.

Code

function mimemail_rules_action_mail_to_user_upgrade($element, RulesPlugin $target) {
  switch ($element['#settings']['#argument map']['user']) {
    case 'author':
      $token = 'node:author';
      break;
    case 'author_unchanged':
      $token = 'node-unchanged:author';
      break;
    case 'user':
      $token = 'site:current-user';
      break;
  }
  $target->settings['to:select'] = $token . ':mail';
  mimemail_rules_action_mail_upgrade($element, $target);
}