HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers42/tandartsmaas.nl/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);
        });
    }
}