mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 09:04:35 +01:00
19 lines
391 B
PHP
Executable File
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);
|
|
});
|
|
}
|
|
} |