From 3a9e12c29a35473029cd593aae38f55f675b761c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 24 Apr 2017 22:23:11 +0300 Subject: [PATCH] Fix for email reply-to --- app/Ninja/Mailers/ContactMailer.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php index bc2cbaa4cd55..e637ecf199b1 100644 --- a/app/Ninja/Mailers/ContactMailer.php +++ b/app/Ninja/Mailers/ContactMailer.php @@ -8,7 +8,6 @@ use App\Models\Invitation; use App\Models\Invoice; use App\Models\Payment; use App\Services\TemplateService; -use Auth; use Event; use Utils; @@ -139,14 +138,10 @@ class ContactMailer extends Mailer ) { $client = $invoice->client; $account = $invoice->account; + $user = $invitation->user; - if (Auth::check()) { - $user = Auth::user(); - } else { - $user = $invitation->user; - if ($invitation->user->trashed()) { - $user = $account->users()->orderBy('id')->first(); - } + if ($invitation->user->trashed()) { + $user = $account->users()->orderBy('id')->first(); } if (! $user->email || ! $user->registered) {