Skip to content

Commit c0787c7

Browse 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

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mailer.rst

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy