diff --git a/src/MandrillService.php b/src/MandrillService.php index a96b4f7..5bea006 100644 --- a/src/MandrillService.php +++ b/src/MandrillService.php @@ -113,14 +113,17 @@ class MandrillService implements MandrillServiceInterface { $receiver_array = explode(',', $receiver); foreach ($receiver_array as $email) { if (preg_match(MANDRILL_EMAIL_REGEX, $email, $matches)) { - $recipients[] = array( + $recipients[] = [ 'email' => $matches[2], 'name' => $matches[1], 'type' => $type, - ); + ]; } else { - $recipients[] = array('email' => $email); + $recipients[] = [ + 'email' => $email, + 'type' => $type, + ]; } } }