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
Hillel Coren 63a6b88e20 bug fixes
2014-03-05 22:19:12 +02:00

21 lines
414 B
PHP
Executable File

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