You are here

function _subscriptions_mail_site_mail in Subscriptions 7

Same name and namespace in other branches
  1. 5.2 subscriptions_mail.module \_subscriptions_mail_site_mail()
  2. 6 subscriptions_mail.module \_subscriptions_mail_site_mail()
  3. 2.0.x subscriptions_mail/subscriptions_mail.module \_subscriptions_mail_site_mail()

Returns the 'From:' address to use for sending e-mail.

Parameters

bool $address_only:

Return value

string

2 calls to _subscriptions_mail_site_mail()
_subscriptions_mail_cron in ./subscriptions_mail.cron.inc
Implementation of hook_cron().
_subscriptions_mail_form_subscriptions_settings_form_alter in ./subscriptions_mail.admin.inc
Implementation of hook_form_alter().

File

./subscriptions_mail.module, line 70
Subscriptions module mail gateway.

Code

function _subscriptions_mail_site_mail($address_only = FALSE) {
  $email = variable_get('subscriptions_site_mail', '');
  if (empty($email)) {
    $email = variable_get('site_mail', ini_get('sendmail_from'));
  }
  if (!$address_only && ($name = variable_get('subscriptions_site_mail_name', FALSE))) {
    $email = '"' . $name . '" <' . $email . '>';
  }
  return $email;
}