Skip to content

Commit 0abbd34

Browse files
committed
minor symfony#5240 [Cookbook][Email] revert symfony#4808 (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [Cookbook][Email] revert symfony#4808 | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | symfony#4884 Commits ------- b1e8d54 revert symfony#4808
2 parents 0c70254 + b1e8d54 commit 0abbd34

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cookbook/email/email.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,8 @@ an email is pretty straightforward::
9393

9494
public function indexAction($name)
9595
{
96-
$mailer = $this->get('mailer');
97-
$message = $mailer->createMessage()
98-
->setSubject('You have Completed Registration!')
96+
$message = \Swift_Message::newInstance()
97+
->setSubject('Hello Email')
9998
->setFrom('send@example.com')
10099
->setTo('recipient@example.com')
101100
->setBody(
@@ -117,7 +116,7 @@ an email is pretty straightforward::
117116
)
118117
*/
119118
;
120-
$mailer->send($message);
119+
$this->get('mailer')->send($message);
121120

122121
return $this->render(...);
123122
}

0 commit comments

Comments
 (0)