1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 09:04:35 +01:00
invoiceninja/app/ninja/mailers/Mailer.php
Hillel Coren ba9b95f50f bug fixes
2014-01-08 23:22:56 +00:00

19 lines
391 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'
];
Mail::queue($views, $data, function($message) use ($toEmail, $fromEmail, $subject)
{
$message->to($toEmail)->replyTo($fromEmail)->subject($subject);
});
}
}