Skip to content
Snippets Groups Projects
Commit 377cf4cd authored by lambic's avatar lambic Committed by Brady
Browse files

Issue #3222819 by lambic, Perignon: Allow sending in behalf of subusers

parent 1422fce5
Branches
Tags 8.x-2.0-beta2
4 merge requests!30Issue #2971991 by amykhailova, code-drupal: "Cc" Recipient not receiving email...,!25Issue #2979620 by Baik Ho: 400 Bad Request - Handle exception returned from...,!11Issue #3222819 by lambic, Perignon: Allow sending in behalf of subusers,!10Issue #2848810 by Perignon: Notice: Account for Reply-To being all lower case....
......@@ -149,6 +149,11 @@ class SendGridMail implements MailInterface, ContainerFactoryPluginInterface {
$site_config = $this->configFactory->get('system.site');
$sendgrid_config = $this->configFactory->get('sendgrid_integration.settings');
if (isset($message['params']['apikey'])) {
$key_secret = $message['params']['apikey'];
unset($message['apikey']);
}
else {
$key_secret = $sendgrid_config->get('apikey');
if ($this->moduleHandler->moduleExists('key')) {
$key = \Drupal::service('key.repository')->getKey($key_secret);
......@@ -159,6 +164,7 @@ class SendGridMail implements MailInterface, ContainerFactoryPluginInterface {
}
}
}
}
if (empty($key_secret)) {
// Set a error in the logs if there is no API key.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment