We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb9505e commit 3bc985fCopy full SHA for 3bc985f
1 file changed
src/Mailer/Transport/SendGridTransport.php
@@ -193,10 +193,9 @@ protected function _prepareEmailAddresses(Message $message)
193
if (!empty($replyTo)) {
194
if (key($replyTo) != $replyTo[key($replyTo)]) {
195
$this->_reqParams['reply_to'] = (object)['email' => key($replyTo), 'name' => $replyTo[key($replyTo)]];
196
-
197
} else {
198
$this->_reqParams['reply_to'] = (object)['email' => key($replyTo)];
199
- }
+ }
200
}
201
202
$emails = [];
@@ -207,6 +206,10 @@ protected function _prepareEmailAddresses(Message $message)
207
206
];
208
209
+ if (empty($emails['to'])) {
210
+ throw new SendGridApiException('Missing to email address.');
211
212
+
213
foreach ($message->getCc() as $ccEmail => $ccName) {
214
$emails['cc'][] = [
215
'email' => $ccEmail,
0 commit comments