File: D:/HostingSpaces/SBogers10/tandartsmaas.komma.pro/app/Komma/Email/Mailer/Mailer.php
<?php
namespace Komma\Email\Mailer;
use \Illuminate\Mail\Mailer as Mail;
use Komma\Email\StyleService\StyleService;
abstract class Mailer
{
/**
* @var Mail
*/
private $mail;
/**
* @var StyleService
*/
private $styleService;
/**
* @param Mail $mail
* @param StyleService $styleService
*/
public function __construct(Mail $mail, StyleService $styleService)
{
$this->mail = $mail;
$this->styleService = $styleService;
}
public function sendTo($email, $subject, $view, $data = [])
{
$data['style'] = serialize($this->styleService);
return $this->mail->queue($view, $data, function($message) use ($email,$subject)
{
$message->to($email)->subject($subject);
});
}
}