company = $company; $this->user = $user; $this->ip = $ip; } /** * Build the message. * * @return $this */ public function build() { App::setLocale($this->company->getLocale()); return $this->from(config('mail.from.address'), config('mail.from.name')) ->subject(ctrans('texts.new_login_detected')) ->text('email.admin.generic_text', [ 'title' => ctrans('texts.new_login_detected'), 'body' => strip_tags(ctrans('texts.new_login_description', ['email' => $this->user->email, 'ip' => $this->ip, 'time' => now()])), ]) ->view('email.admin.notification') ->with([ 'settings' => $this->company->settings, 'logo' => $this->company->present()->logo(), 'title' => ctrans('texts.new_login_detected'), 'body' => ctrans('texts.new_login_description', ['email' => $this->user->email, 'ip' => $this->ip, 'time' => now()]), 'whitelabel' => $this->company->account->isPaid(), ]); } }