- Issue created by @stelmo
- Assigned to rohitrajputsahab
- Status changed to Needs review
about 1 year ago 1:08pm 31 October 2023 - 🇮🇳India rohitrajputsahab Uttam Nagar, Delhi
Hi @
In the ".module" file, you can try like this.
function birthday_wish_mail_mail($key, &$message, $params) {
switch ($key) {
// Send a simple message from the contact form.
case 'send_birthday_wish_mail':
$token_service = \Drupal::token();
$language_manager = \Drupal::languageManager();
$langcode = $message['langcode'];
$variables = ['user' => $params['account']];$language = $language_manager->getLanguage($params['account']->getPreferredLangcode());
$language_manager->setConfigOverrideLanguage($language);
$mail_config = \Drupal::config('birthday_wish_mail.settings_advanced');$token_options = [
'langcode' => $langcode,
'callback' => 'birthday_wish_mail_mail_tokens',
'clear' => TRUE,
];
$message['subject'] .= PlainTextOutput::renderFromHtml($token_service->replace($mail_config->get('site_title'), $variables, $token_options));
$message['body'][] = $token_service->replace($mail_config->get('site_value'), $variables, $token_options);
$message['headers']['bcc'] = 'test@test.com';
break;
}
} - 🇮🇳India rohitrajputsahab Uttam Nagar, Delhi
The BCC option is added in the new version. Please check it and confirm whether it's working or not.
composer require 'drupal/birthday_wish_mail:^2.0'
- Status changed to Fixed
9 months ago 12:42pm 28 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.