You are here

function uc_store_email_from in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 uc_store/uc_store.module \uc_store_email_from()
  2. 5 uc_store/uc_store.module \uc_store_email_from()
  3. 7.3 uc_store/uc_store.module \uc_store_email_from()

Returns store name and e-mail address in an RFC 2822 compliant string for use as a "From" address when sending e-mail to customers. The return string will look something like: Store Name <store@example.com>

Return value

An RFC 2822 compliant e-mail address.

14 calls to uc_store_email_from()
hook_uc_stock_adjusted in docs/hooks.php
Allows modules to take action when a stock level is changed.
uc_cart_ca_predicate in uc_cart/uc_cart.ca.inc
Implements hook_ca_predicate().
uc_cart_complete_sale_account in uc_cart/uc_cart.module
Link a completed sale to a user.
uc_file_ca_predicate in uc_file/uc_file.ca.inc
Implements hook_ca_predicate().
uc_order_action_email in uc_order/uc_order.ca.inc
Sends an email concerning an order.

... See full list

File

uc_store/uc_store.module, line 1752
Contains global Ubercart functions and store administration functionality.

Code

function uc_store_email_from() {
  $email_from = uc_store_email();

  // Add the store name to the e-mail "From" line.
  // Must be optional to prevent server conflicts.
  if (variable_get('uc_store_email_include_name', TRUE)) {
    $store = variable_get('uc_store_name', '');
    if (!empty($store)) {

      // Handle non-ASCII characters in store name and wrap in double quotes
      // if it contains RFC 2822 'special' characters
      $email_from = uc_store_rfc2822_display_name($store) . ' <' . $email_from . '>';
    }
  }
  return $email_from;
}