I created small custom module which defines user registration emails as the multidomain emails.
The module source:

function mymodule_variable_info_alter(&$variables, $options) {
  $list = array(
    'user_mail_register_admin_created_[mail_part]',
    'user_mail_register_pending_approval_[mail_part]',
    'user_mail_register_no_approval_required_[mail_part]',
    'user_mail_status_activated_[mail_part]',
    'user_mail_status_blocked_[mail_part]',
    'user_mail_cancel_confirm_[mail_part]',
    'user_mail_status_canceled_[mail_part]',    
    'user_mail_password_reset_[mail_part]',
  );
  foreach ($list as $name) {
    if (isset($variables[$name])) {
      $variables[$name]['multidomain'] = TRUE;
    }
  }
}

After enabling this variables as multidomain in the Domain Variables tab and then open the "Account settings" interface to edit the user emails, the email values generated are without the tokens.

Comments

bforchhammer’s picture

[...], the email values generated are without the tokens.

Do you mean that tokens are not replaced properly?

I don't see anything wrong with the code above; not sure what might be causing that behavior... a few ideas:

  • Check whether this works with multilingual email variables (using i18n_variable); if that doesn't work either, it may be a problem with the variable module.
  • Check that the function user_variable_mail_default() is executed when the email body is requested (e.g. when an email is sent). As far as I can see that function is responsible for replacing token values. It should be executed automatically for all mail_text variables.
bforchhammer’s picture

Status: Active » Postponed (maintainer needs more info)
clemens.tolboom’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)

Guess we can close this as no info came back right? Is outdated the correct state?