File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,8 +60,12 @@ public function send(MailMessage $message)
6060 'subject ' => $ message ->getSubject (),
6161 'from_email ' => $ message ->getFrom ()->getEmail (),
6262 'from_name ' => $ message ->getFrom ()->getName (),
63- 'headers ' => ['Reply-To ' => $ message ->getReplyTo ()->getEmail ()],
6463 );
64+
65+ $ replyTo =$ message ->getReplyTo ();
66+ if (!empty ($ replyTo )) {
67+ $ mandrillMessage ['headers ' ]=['Reply-To ' => $ replyTo ->getEmail ()];
68+ }
6569
6670 // Recipients.
6771 $ recipients = [
@@ -87,7 +91,9 @@ public function send(MailMessage $message)
8791 $ mandrillMessage ['to ' ] = $ to ;
8892
8993 // Attachments.
90- if (0 < $ message ->getAttachmentsSize () && $ message ->getAttachmentsSize () < $ this ->attachmentsSizeLimit && $ attachments = $ message ->getAttachments ()) {
94+ if (0 < $ message ->getAttachmentsSize () && $ message ->getAttachmentsSize () < $ this ->attachmentsSizeLimit
95+ && $ attachments = $ message ->getAttachments ()
96+ ) {
9197 $ attachmentsArray = [];
9298 foreach ($ attachments as $ attachment ) {
9399 $ attachmentsArray [] = [
You can’t perform that action at this time.
0 commit comments