File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/Symfony/Component/Mailer/Transport Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,11 @@ protected function doSend(SentMessage $message): void
86
86
$ this ->getLogger ()->debug (sprintf ('Email transport "%s" starting ' , __CLASS__ ));
87
87
88
88
$ command = $ this ->command ;
89
+
90
+ if (!empty ($ recipients = $ message ->getEnvelope ()->getRecipients ())) {
91
+ $ command = str_replace (' -t ' , '' , $ command );
92
+ }
93
+
89
94
if (!str_contains ($ command , ' -f ' )) {
90
95
$ command .= ' -f ' .escapeshellarg ($ message ->getEnvelope ()->getSender ()->getEncodedAddress ());
91
96
}
@@ -96,6 +101,10 @@ protected function doSend(SentMessage $message): void
96
101
$ chunks = AbstractStream::replace ("\n. " , "\n.. " , $ chunks );
97
102
}
98
103
104
+ foreach ($ recipients as $ recipient ) {
105
+ $ command .= ' ' .escapeshellarg ($ recipient ->getEncodedAddress ());
106
+ }
107
+
99
108
$ this ->stream ->setCommand ($ command );
100
109
$ this ->stream ->initialize ();
101
110
foreach ($ chunks as $ chunk ) {
You can’t perform that action at this time.
0 commit comments