Skip to content
Snippets Groups Projects
Commit c800cc4d authored by Oleksandr Tymoshchuk's avatar Oleksandr Tymoshchuk Committed by Ivan Doroshenko
Browse files

Issue #3353729 by o_tymoshchuk, Matroskeen: Add support sending an array of...

Issue #3353729 by o_tymoshchuk, Matroskeen: Add support sending an array of recipients with substitutions and metadata
parent 21735e45
No related branches found
No related tags found
1 merge request!18Added supports sents array of recipients with substitutions and metadata
......@@ -186,9 +186,14 @@ class UniOneMail implements MailInterface, ContainerFactoryPluginInterface {
'params' => [],
];
// Build recipients list.
foreach (explode(',', $message['to']) as $item) {
$recipients[] = ['email' => trim($item)];
// Support custom recipients array with substitutions and metadata.
if (!empty($message['params']['recipients'])) {
$recipients = $message['params']['recipients'];
}
else {
foreach (explode(',', $message['to']) as $item) {
$recipients[] = ['email' => trim($item)];
}
}
[$email, $name] = $this->checkEmail($message['headers']['From']);
......
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