src/Controller/MailerController.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Psr\Log\LoggerInterface;
  4. use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
  5. use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
  6. class MailerController extends EsmtpTransport
  7. {
  8. public function __construct(string $username, string $password, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
  9. {
  10. parent::__construct('smtp.dreamhost.com', 465, true, $dispatcher, $logger);
  11. $this->setUsername($username);
  12. $this->setPassword($password);
  13. }
  14. }