mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Fixes for tickets (#3083)
This commit is contained in:
parent
419d9ea5eb
commit
3c82ba1343
@ -50,14 +50,14 @@ class Mailer
|
||||
$fromEmail = $data['fromEmail'];
|
||||
}
|
||||
|
||||
if (config('services.postmark')) {
|
||||
if (strlen(config('services.postmark')) >=1) {
|
||||
return $this->sendPostmarkMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data);
|
||||
} else {
|
||||
return $this->sendLaravelMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data);
|
||||
}
|
||||
}
|
||||
|
||||
private function sendLaravelMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data = [])
|
||||
public function sendLaravelMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data = [])
|
||||
{
|
||||
if (Utils::isSelfHost()) {
|
||||
if (isset($data['account'])) {
|
||||
|
@ -15,7 +15,7 @@ use Postmark\Models\PostmarkAttachment;
|
||||
/**
|
||||
* Class TicketMailer.
|
||||
*/
|
||||
class TicketMailer
|
||||
class TicketMailer extends Mailer
|
||||
{
|
||||
/**
|
||||
* @param $toEmail
|
||||
@ -51,7 +51,12 @@ class TicketMailer
|
||||
$fromEmail = $data['fromEmail'];
|
||||
|
||||
|
||||
return $this->sendPostmarkMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data);
|
||||
if (strlen(config('services.postmark')) >=1) {
|
||||
return $this->sendPostmarkMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data);
|
||||
} else {
|
||||
return $this->sendLaravelMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data);
|
||||
}
|
||||
//return $this->sendPostmarkMail($toEmail, $fromEmail, $fromName, $replyEmail, $subject, $views, $data);
|
||||
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ class TicketRepository extends BaseRepository
|
||||
*/
|
||||
|
||||
if($input['action'] != TICKET_SAVE_ONLY)
|
||||
$this->dispatch_now(new TicketAction($changedAttributes, $oldTicket, $ticket, $input['action']));
|
||||
dispatch_now(new TicketAction($changedAttributes, $oldTicket, $ticket, $input['action']));
|
||||
|
||||
return $ticket;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user