1
0
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:
David Bomba 2019-11-20 18:12:11 +11:00 committed by GitHub
parent 419d9ea5eb
commit 3c82ba1343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View File

@ -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'])) {

View File

@ -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);
}

View File

@ -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;