Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpotthast/ebf33afbdc4feda9f1485f7efb2e4afa to your computer and use it in GitHub Desktop.
Save danielpotthast/ebf33afbdc4feda9f1485f7efb2e4afa to your computer and use it in GitHub Desktop.
<?php
namespace Demo;
class NewsletterManager
{
private $mailer;
public function setMailer(MailerInterface $mailer)
{
$this->mailer = $mailer;
}
public function sendMail(array $recipients, Message $message)
{
foreach ($recipients as $recipient) {
$this->mailer->send($recipient, $message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment