Skip to content

Commit bbc4077

Browse files
Improved more help notes
1 parent a596761 commit bbc4077

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AppBundle/EventListener/CommentNotificationListener.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public function onCommentCreated(GenericEvent $event)
7474
'%link%' => $linkToPost.'#comment_'.$comment->getId(),
7575
]);
7676

77+
// Symfony uses a library called SwiftMailer to send emails. That's why
78+
// email messages are created instantiating a Swift_Message class.
7779
// See http://symfony.com/doc/current/email.html#sending-emails
7880
$message = \Swift_Message::newInstance()
7981
->setSubject($subject)
@@ -82,7 +84,9 @@ public function onCommentCreated(GenericEvent $event)
8284
->setBody($body, 'text/html')
8385
;
8486

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.
8690
// See http://symfony.com/doc/current/email/dev_environment.html#viewing-from-the-web-debug-toolbar
8791
$this->mailer->send($message);
8892
}

0 commit comments

Comments
 (0)