1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/ninja/mailers/Mailer.php
Hillel Coren 2b56c8a299 bug fixes
2014-01-07 23:59:06 +00:00

20 lines
436 B
PHP
Executable File

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