You are here

function multiple_email_message_part in Multiple E-mail Addresses 7

Same name and namespace in other branches
  1. 5 multiple_email.module \multiple_email_message_part()
  2. 6 multiple_email.module \multiple_email_message_part()
  3. 2.x multiple_email.module \multiple_email_message_part()

Returns the part of the specified e-mail message based on site settings.

Parameters

string $part (subject or body):

string $type:

object $account:

object $email:

Return value

string

3 calls to multiple_email_message_part()
MultipleEmailUserTestCase::testMultipleEmailUser in ./multiple_email.test
Test that the Multiple E-mails user can add a new e-mail address.
multiple_email_expire_address in ./multiple_email.module
Removes the specified address from the user who added it and sends their primary e-mail account a message notifying them about the expiration.
multiple_email_send_confirmation in ./multiple_email.module
Sends the confirmation e-mail for the specified address to the specified user account.

File

./multiple_email.module, line 689
multiple_email module file

Code

function multiple_email_message_part($part, $type, $account, $email) {
  $func = "multiple_email_default_{$part}";
  if (module_exists('i18n_variable')) {
    $language = user_preferred_language($account);
    $setting = i18n_variable_get("multiple_email_{$type}_{$part}", $language->language, $func($type));
  }
  else {
    $setting = variable_get("multiple_email_{$type}_{$part}", $func($type));
  }
  return multiple_email_var_replace($setting, $account, $email);
}