Example #1
0
 /**
  * Send a notification mail to the author
  *
  * @param Article $article
  */
 public function sendNotifyMailWithComments(Article $article)
 {
     $message = Swift_Message::newInstance()->setSubject('Article notifications')->setFrom('*****@*****.**')->setTo($article->getAuthorEmail())->setBody(sprintf('Hello, you have %d comment(s) for the last 24 hours for the article "%s"', $article->getComments()->count(), $article->getTitle()));
     $this->mailer->send($message);
 }