function basic_cart_mail in Basic cart 8.6
Same name and namespace in other branches
- 8 basic_cart.module \basic_cart_mail()
- 8.0 basic_cart.module \basic_cart_mail()
- 8.2 basic_cart.module \basic_cart_mail()
- 8.3 basic_cart.module \basic_cart_mail()
- 8.4 basic_cart.module \basic_cart_mail()
- 8.5 basic_cart.module \basic_cart_mail()
- 7 basic_cart.cart.inc \basic_cart_mail()
- 7.2 basic_cart.cart.inc \basic_cart_mail()
Implements hook_mail().
File
- ./
basic_cart.module, line 131 - Basic cart module file.
Code
function basic_cart_mail($key, &$message, $params) {
$utility = new Utility();
$config = $utility
->checkoutSettings();
/* $options = array(
'langcode' => $message['langcode'],
);*/
$message['from'] = \Drupal::config('system.site')
->get('mail');
switch ($key) {
case 'admin_mail':
$message['subject'] = Html::escape($config
->get('admin')['subject']);
$message['body'][] = Xss::filter($params['admin_message']);
break;
case 'user_mail':
$message['subject'] = Html::escape($config
->get('user')['subject']);
$message['body'][] = Xss::filter($params['user_message']);
break;
}
}