Skip to content
Snippets Groups Projects
Commit 1c57fc1d authored by omkar yewale's avatar omkar yewale Committed by Ryan Hartman
Browse files

Issue #3337836 by Jay Jangid, Adil_Siddiqui, omkar_yewale, sidharth_soman,...

Issue #3337836 by Jay Jangid, Adil_Siddiqui, omkar_yewale, sidharth_soman, spriya2896, devkinetic, apaderno, rckstr_rohan: Fix the issues reported by phpcs
parent c8d37154
No related branches found
No related tags found
No related merge requests found
<?php
/**
* @file Adds a BCC address to all e-mails sent by the website.
* @file
* Adds a BCC address to all e-mails sent by the website.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
......@@ -22,6 +24,7 @@ function bcc_help($route_name, RouteMatchInterface $route_match) {
default:
}
}
/**
* Add Bcc from settings into all outgoing email.
*
......@@ -36,7 +39,7 @@ function bcc_mail_alter(array &$message) {
$bcc_config = $config->get('bcc.settings');
if ($bcc_config->get('enable')) {
$existingBcc = isset($message['headers']['Bcc']) ? $message['headers']['Bcc'] : '';
$existingBcc = $message['headers']['Bcc'] ?? '';
$message['headers']['Bcc'] = implode(' ', array_merge(
explode(' ', $existingBcc),
[$bcc_config->get('bcc_mail')]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment