feat: new shared function name is_transactional_emails_enabled()
This commit is contained in:
@@ -48,7 +48,7 @@ class Controller extends BaseController
|
||||
|
||||
public function forgot_password(Request $request)
|
||||
{
|
||||
if (is_transactional_emails_active()) {
|
||||
if (is_transactional_emails_enabled()) {
|
||||
$arrayOfRequest = $request->only(Fortify::email());
|
||||
$request->merge([
|
||||
'email' => Str::lower($arrayOfRequest['email']),
|
||||
|
||||
@@ -201,7 +201,7 @@ class SettingsEmail extends Component
|
||||
} catch (\Throwable $e) {
|
||||
$this->resendEnabled = false;
|
||||
|
||||
return handleError($e, $this);
|
||||
return handleError($e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,12 +229,7 @@ class SettingsEmail extends Component
|
||||
throw new \Exception('Too many messages sent!');
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
return handleError($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function isEmailEnabled(): bool
|
||||
{
|
||||
return $this->settings->smtp_enabled || $this->settings->resend_enabled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class S3Storage extends BaseModel
|
||||
$this->is_usable = true;
|
||||
} catch (\Throwable $e) {
|
||||
$this->is_usable = false;
|
||||
if ($this->unusable_email_sent === false && is_transactional_emails_active()) {
|
||||
if ($this->unusable_email_sent === false && is_transactional_emails_enabled()) {
|
||||
$mail = new MailMessage;
|
||||
$mail->subject('Coolify: S3 Storage Connection Error');
|
||||
$mail->view('emails.s3-connection-error', ['name' => $this->name, 'reason' => $e->getMessage(), 'url' => route('storage.show', ['storage_uuid' => $this->uuid])]);
|
||||
|
||||
Reference in New Issue
Block a user