You are here

function uc_store_email_from in Ubercart 8.4

Same name and namespace in other branches
  1. 5 uc_store/uc_store.module \uc_store_email_from()
  2. 6.2 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.

The return string is intended for use as a "From" address when sending e-mail to customers. It will look something like: Store Name <store@example.com>

Return value

string An RFC 2822 compliant e-mail address.

19 calls to uc_store_email_from()
CartManager::completeSaleAccount in uc_cart/src/CartManager.php
Link a completed sale to a user.
EmailOrderInvoice::doExecute in uc_order/src/Plugin/RulesAction/EmailOrderInvoice.php
Emails an invoice.
hook_uc_stock_adjusted in uc_stock/uc_stock.api.php
Allows modules to take action when a stock level is changed.
MailInvoiceForm::submitForm in uc_order/src/Form/MailInvoiceForm.php
Form submission handler.
OrderAdminController::selectCustomer in uc_order/src/Controller/OrderAdminController.php
Presents the customer search results and let one of them be chosen.

... See full list

File

uc_store/uc_store.module, line 635
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 (\Drupal::config('uc_store.settings')
    ->get('mail_include_name')) {
    $email_from = uc_store_rfc2822_display_name(uc_store_name()) . ' <' . $email_from . '>';
  }
  return $email_from;
}