Skip to content

Commit 19d9617

Browse files
committed
Update example to use Address format
It seems strange to me that the example for the From headers uses the full Address format, whereas the sender envelope does not. I believe it is possible to use it here, so thought I would expand on the example to show how you can set both the display name and email address when configuring the sender envelope globally.
1 parent 29d3c27 commit 19d9617

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mailer.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ and headers.
551551
framework:
552552
mailer:
553553
envelope:
554-
sender: 'fabien@example.com'
554+
sender: 'Fabien <fabien@example.com>'
555555
recipients: ['foo@example.com', 'bar@example.com']
556556
headers:
557557
From: 'Fabien <fabien@example.com>'
@@ -573,7 +573,7 @@ and headers.
573573
<framework:config>
574574
<framework:mailer>
575575
<framework:envelope>
576-
<framework:sender>fabien@example.com</framework:sender>
576+
<framework:sender>Fabien &lt;fabien@example.com&gt;</framework:sender>
577577
<framework:recipients>foo@example.com</framework:recipients>
578578
<framework:recipients>bar@example.com</framework:recipients>
579579
</framework:envelope>
@@ -593,7 +593,7 @@ and headers.
593593
$mailer = $framework->mailer();
594594
$mailer
595595
->envelope()
596-
->sender('fabien@example.com')
596+
->sender('Fabien <fabien@example.com>')
597597
->recipients(['foo@example.com', 'bar@example.com'])
598598
;
599599

0 commit comments

Comments
 (0)