File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -193,10 +193,9 @@ protected function _prepareEmailAddresses(Message $message)
193193 if (!empty ($ replyTo )) {
194194 if (key ($ replyTo ) != $ replyTo [key ($ replyTo )]) {
195195 $ this ->_reqParams ['reply_to ' ] = (object )['email ' => key ($ replyTo ), 'name ' => $ replyTo [key ($ replyTo )]];
196-
197196 } else {
198197 $ this ->_reqParams ['reply_to ' ] = (object )['email ' => key ($ replyTo )];
199- }
198+ }
200199 }
201200
202201 $ emails = [];
@@ -207,6 +206,10 @@ protected function _prepareEmailAddresses(Message $message)
207206 ];
208207 }
209208
209+ if (empty ($ emails ['to ' ])) {
210+ throw new SendGridApiException ('Missing to email address. ' );
211+ }
212+
210213 foreach ($ message ->getCc () as $ ccEmail => $ ccName ) {
211214 $ emails ['cc ' ][] = [
212215 'email ' => $ ccEmail ,
You can’t perform that action at this time.
0 commit comments