diff --git a/src/Plugin/Mail/SendGridMail.php b/src/Plugin/Mail/SendGridMail.php index 9b6caa8ca4c9e37acce4f2e7ba3079bbd6b9b088..90f590bebc2937114efe3e02b8dc3b2d1059ba0c 100644 --- a/src/Plugin/Mail/SendGridMail.php +++ b/src/Plugin/Mail/SendGridMail.php @@ -457,6 +457,7 @@ class SendGridMail implements MailInterface, ContainerFactoryPluginInterface { if (in_array(mb_strtolower($key), $cc_bcc_keys)) { $mail_ids = explode(',', $value); foreach ($mail_ids as $mail_id) { + $mail_id = trim($mail_id); $email_components = $this->parseAddress($mail_id); $mail_cc_address = $email_components[0]; // If there was a name with the mail,