File tree Expand file tree Collapse file tree
src/Utopia/Messaging/Adapter/Email Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ protected function process(EmailMessage $message): array
5252
5353 $ domain = $ this ->isEU ? $ euDomain : $ usDomain ;
5454
55- $ recipients = $ message ->getTo ();
55+ $ recipients = $ message ->getTo ();
5656 $ toEmails = \array_map (fn ($ to ) => $ to ['email ' ], $ recipients );
5757
5858 $ body = [
@@ -66,9 +66,12 @@ protected function process(EmailMessage $message): array
6666 'subject ' => $ message ->getSubject (),
6767 'text ' => $ message ->isHtml () ? null : $ message ->getContent (),
6868 'html ' => $ message ->isHtml () ? $ message ->getContent () : null ,
69- 'h:Reply-To: ' ."{$ message ->getReplyToName ()} < {$ message ->getReplyToEmail ()}> " ,
7069 ];
7170
71+ if (!empty ($ message ->getReplyToEmail ())) {
72+ $ body ['h:Reply-To ' ] = "{$ message ->getReplyToName ()} < {$ message ->getReplyToEmail ()}> " ;
73+ }
74+
7275 if (\count ($ recipients ) > 1 ) {
7376 $ body ['recipient-variables ' ] = json_encode (array_fill_keys ($ toEmails , []));
7477 }
You can’t perform that action at this time.
0 commit comments