Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c0787c7

Browse filesBrowse files
committed
minor #16428 [Mailer] Capitalise From and Bcc header names in global mailer configuration (andyexeter)
This PR was submitted for the 5.4 branch but it was merged into the 5.3 branch instead. Discussion ---------- [Mailer] Capitalise From and Bcc header names in global mailer configuration If the `From` header name is not capitalised, the header is replaced by the `Sender` address in the Mime component's Message object: https://github.com/symfony/symfony/blob/6a52b66da0d35b21031bb344e79522f73d60e05a/src/Symfony/Component/Mime/Message.php#L76-L81 I capitalised `Bcc` as well because the component also looks for this header in a case-sensitive way. Commits ------- 418426a Capitalise From and Bcc header names in global mailer configuration
2 parents 9363130 + 418426a commit c0787c7
Copy full SHA for c0787c7

File tree

1 file changed

+6
-6
lines changed
Filter options

1 file changed

+6
-6
lines changed

‎mailer.rst

Copy file name to clipboardExpand all lines: mailer.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ and headers.
535535
sender: 'fabien@example.com'
536536
recipients: ['foo@example.com', 'bar@example.com']
537537
headers:
538-
from: 'Fabien <fabien@example.com>'
539-
bcc: 'baz@example.com'
538+
From: 'Fabien <fabien@example.com>'
539+
Bcc: 'baz@example.com'
540540
X-Custom-Header: 'foobar'
541541
542542
.. code-block:: xml
@@ -558,8 +558,8 @@ and headers.
558558
<framework:recipients>foo@example.com</framework:recipients>
559559
<framework:recipients>bar@example.com</framework:recipients>
560560
</framework:envelope>
561-
<framework:header name="from">Fabien &lt;fabien@example.com&gt;</framework:header>
562-
<framework:header name="bcc">baz@example.com</framework:header>
561+
<framework:header name="From">Fabien &lt;fabien@example.com&gt;</framework:header>
562+
<framework:header name="Bcc">baz@example.com</framework:header>
563563
<framework:header name="X-Custom-Header">foobar</framework:header>
564564
</framework:mailer>
565565
</framework:config>
@@ -578,8 +578,8 @@ and headers.
578578
->recipients(['foo@example.com', 'bar@example.com'])
579579
;
580580
581-
$mailer->header('from')->value('Fabien <fabien@example.com>');
582-
$mailer->header('bcc')->value('baz@example.com');
581+
$mailer->header('From')->value('Fabien <fabien@example.com>');
582+
$mailer->header('Bcc')->value('baz@example.com');
583583
$mailer->header('X-Custom-Header')->value('foobar');
584584
};
585585

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.