2013-12-25 22:34:42 +01:00
|
|
|
<?php namespace ninja\mailers;
|
|
|
|
|
|
|
|
use Invoice;
|
|
|
|
use Contact;
|
|
|
|
use User;
|
|
|
|
|
|
|
|
class UserMailer extends Mailer {
|
|
|
|
|
|
|
|
public function sendNotification(User $user, Invoice $invoice, $type)
|
|
|
|
{
|
|
|
|
if (!$user->email)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$view = 'invoice';
|
|
|
|
//$data = array('link' => URL::to('view') . '/' . $invoice->invoice_key);
|
2014-01-08 00:59:06 +01:00
|
|
|
$data = ['link' => ''];
|
2013-12-25 22:34:42 +01:00
|
|
|
$subject = 'Notification - Invoice ' . $type;
|
|
|
|
|
2014-01-07 16:50:41 +01:00
|
|
|
$this->sendTo($user->email, CONTACT_EMAIL, $subject, $view, $data);
|
2013-12-25 22:34:42 +01:00
|
|
|
}
|
|
|
|
}
|