Changeset View
Changeset View
Standalone View
Standalone View
src/app/Mail/SignupVerification.php
Show All 25 Lines | class SignupVerification extends Mailable | ||||
/** | /** | ||||
* Build the message. | * Build the message. | ||||
* | * | ||||
* @return $this | * @return $this | ||||
*/ | */ | ||||
public function build() | public function build() | ||||
{ | { | ||||
$tenantId = \config('app.tenant_id'); | |||||
$href = Utils::serviceUrl( | $href = Utils::serviceUrl( | ||||
sprintf('/signup/%s-%s', $this->code->short_code, $this->code->code) | sprintf('/signup/%s-%s', $this->code->short_code, $this->code->code), | ||||
$tenantId | |||||
); | ); | ||||
$username = $this->code->first_name ?? ''; | $username = $this->code->first_name ?? ''; | ||||
if (!empty($this->code->last_name)) { | if (!empty($this->code->last_name)) { | ||||
$username .= ' ' . $this->code->last_name; | $username .= ' ' . $this->code->last_name; | ||||
} | } | ||||
$username = trim($username); | $username = trim($username); | ||||
$vars = [ | $vars = [ | ||||
'site' => \config('app.name'), | 'site' => \App\Tenant::getConfig($tenantId, 'app.name'), | ||||
'name' => $username ?: 'User', | 'name' => $username ?: 'User', | ||||
]; | ]; | ||||
$this->view('emails.html.signup_verification') | $this->view('emails.html.signup_verification') | ||||
->text('emails.plain.signup_verification') | ->text('emails.plain.signup_verification') | ||||
->subject(\trans('mail.signupverification-subject', $vars)) | ->subject(\trans('mail.signupverification-subject', $vars)) | ||||
->with([ | ->with([ | ||||
'vars' => $vars, | 'vars' => $vars, | ||||
Show All 30 Lines |