File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/AppBundle/EventListener Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ public function onCommentCreated(GenericEvent $event)
74
74
'%link% ' => $ linkToPost .'#comment_ ' .$ comment ->getId (),
75
75
]);
76
76
77
+ // Symfony uses a library called SwiftMailer to send emails. That's why
78
+ // email messages are created instantiating a Swift_Message class.
77
79
// See http://symfony.com/doc/current/email.html#sending-emails
78
80
$ message = \Swift_Message::newInstance ()
79
81
->setSubject ($ subject )
@@ -82,7 +84,9 @@ public function onCommentCreated(GenericEvent $event)
82
84
->setBody ($ body , 'text/html ' )
83
85
;
84
86
85
- // You can view a sent email in the debug toolbar
87
+ // In app/config/config_dev.yml the 'disable_delivery' option is set to 'true'.
88
+ // That's why in the development environment you won't actually receive any email.
89
+ // However, you can inspect the contents of those unsent emails using the debug toolbar.
86
90
// See http://symfony.com/doc/current/email/dev_environment.html#viewing-from-the-web-debug-toolbar
87
91
$ this ->mailer ->send ($ message );
88
92
}
You can’t perform that action at this time.
0 commit comments