You are here

function _subscriptions_mail_site_mail in Subscriptions 5.2

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

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

2 calls to _subscriptions_mail_site_mail()
subscriptions_mail_cron in ./subscriptions_mail.module
Implementation of hook_cron().
subscriptions_mail_form_alter in ./subscriptions_mail.module
Implementation of hook_form_alter().

File

./subscriptions_mail.module, line 235
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;
}