An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fixes
Andras Bacsai766fa85c4ce1
diff --git a/app/Http/Livewire/Notifications/EmailSettings.php b/app/Http/Livewire/Notifications/EmailSettings.phpindex 1dd3746e80..aa72b5478a 100644--- a/app/Http/Livewire/Notifications/EmailSettings.php+++ b/app/Http/Livewire/Notifications/EmailSettings.php@@ -55,17 +55,23 @@ class EmailSettings extends Component{$settings = InstanceSettings::get();if ($settings->smtp_enabled) {- $this->model->smtp_enabled = true;- $this->model->smtp_from_address = $settings->smtp_from_address;- $this->model->smtp_from_name = $settings->smtp_from_name;- $this->model->smtp_recipients = $settings->smtp_recipients;- $this->model->smtp_host = $settings->smtp_host;- $this->model->smtp_port = $settings->smtp_port;- $this->model->smtp_encryption = $settings->smtp_encryption;- $this->model->smtp_username = $settings->smtp_username;- $this->model->smtp_password = $settings->smtp_password;- $this->model->smtp_timeout = $settings->smtp_timeout;- $this->saveModel();+ $team = auth()->user()->currentTeam();+ $team->smtp_enabled = true;+ $team->smtp_from_address = $settings->smtp_from_address;+ $team->smtp_from_name = $settings->smtp_from_name;+ $team->smtp_recipients = $settings->smtp_recipients;+ $team->smtp_host = $settings->smtp_host;+ $team->smtp_port = $settings->smtp_port;+ $team->smtp_encryption = $settings->smtp_encryption;+ $team->smtp_username = $settings->smtp_username;+ $team->smtp_password = $settings->smtp_password;+ $team->smtp_timeout = $settings->smtp_timeout;+ $team->save();+ $this->decrypt();+ if (is_a($team, Team::class)) {+ session(['currentTeam' => $this->model]);+ }+ $this->emit('success', 'Settings saved.');} else {$this->emit('error', 'Instance SMTP settings are not enabled.');}diff --git a/app/Models/Team.php b/app/Models/Team.phpindex ccd7613a6b..331c969d75 100644--- a/app/Models/Team.php+++ b/app/Models/Team.php@@ -26,10 +26,8 @@ class Team extends Model implements SendsDiscord, SendsEmailpublic function getRecepients($notification){$recipients = data_get($notification,'emails',null);- ray($recipients);if (is_null($recipients)) {$recipients = $this->members()->pluck('email')->toArray();- ray($recipients);return $recipients;}return explode(',', $recipients);diff --git a/resources/views/livewire/notifications/email-settings.blade.php b/resources/views/livewire/notifications/email-settings.blade.phpindex 436b09cf18..ae10dc95b7 100644--- a/resources/views/livewire/notifications/email-settings.blade.php+++ b/resources/views/livewire/notifications/email-settings.blade.php@@ -31,27 +31,29 @@<div class="w-48"><x-forms.checkbox instantSave id="model.smtp_enabled" label="Notification Enabled" /></div>-- <div class="flex flex-col gap-2 xl:flex-row">- <x-forms.input id="model.smtp_recipients" placeholder="If empty, all users will be notified in the team."- helper="Email list to send the all notifications to, separated by comma." label="Recipients" />- </div>- <div class="flex flex-col gap-2 xl:flex-row">- <x-forms.input required id="model.smtp_host" helper="SMTP Hostname" placeholder="smtp.mailgun.org"- label="Host" />- <x-forms.input required id="model.smtp_port" helper="SMTP Port" placeholder="587" label="Port" />- <x-forms.input helper="If SMTP through SSL, set it to 'tls'." placeholder="tls" id="model.smtp_encryption"- label="Encryption" />- </div>- <div class="flex flex-col gap-2 xl:flex-row">- <x-forms.input id="model.smtp_username" label="SMTP Username" />- <x-forms.input type="password" id="model.smtp_password" label="SMTP Password" />- <x-forms.input id="model.smtp_timeout" helper="Timeout value for sending emails." label="Timeout" />- </div>- <div class="flex flex-col gap-2 xl:flex-row">- <x-forms.input required id="model.smtp_from_name" helper="Name used in emails." label="From Name" />- <x-forms.input required id="model.smtp_from_address" helper="Email address used in emails."- label="From Address" />+ <div class="flex flex-col gap-4">+ <div class="flex flex-col gap-2 xl:flex-row">+ <x-forms.input id="model.smtp_recipients"+ placeholder="If empty, all users will be notified in the team."+ helper="Email list to send the all notifications to, separated by comma." label="Recipients" />+ </div>+ <div class="flex flex-col gap-2 xl:flex-row">+ <x-forms.input required id="model.smtp_host" helper="SMTP Hostname" placeholder="smtp.mailgun.org"+ label="Host" />+ <x-forms.input required id="model.smtp_port" helper="SMTP Port" placeholder="587" label="Port" />+ <x-forms.input helper="If SMTP through SSL, set it to 'tls'." placeholder="tls"+ id="model.smtp_encryption" label="Encryption" />+ </div>+ <div class="flex flex-col gap-2 xl:flex-row">+ <x-forms.input id="model.smtp_username" label="SMTP Username" />+ <x-forms.input type="password" id="model.smtp_password" label="SMTP Password" />+ <x-forms.input id="model.smtp_timeout" helper="Timeout value for sending emails." label="Timeout" />+ </div>+ <div class="flex flex-col gap-2 xl:flex-row">+ <x-forms.input required id="model.smtp_from_name" helper="Name used in emails." label="From Name" />+ <x-forms.input required id="model.smtp_from_address" helper="Email address used in emails."+ label="From Address" />+ </div></div></form>@if (data_get($model, 'smtp_enabled'))