1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00
invoiceninja/app/ninja/mailers/Mailer.php
2013-12-25 16:34:42 -05:00

19 lines
357 B
PHP
Executable File

<?php namespace ninja\mailers;
use Mail;
abstract class Mailer {
public function sendTo($email, $subject, $view, $data = [])
{
$views = [
'html' => 'emails.'.$view.'_html',
'text' => 'emails.'.$view.'_text'
];
Mail::queue($views, $data, function($message) use ($email, $subject)
{
$message->to($email)->subject($subject);
});
}
}