fix
This commit is contained in:
parent
43583d7777
commit
d4976c6eb6
@ -42,6 +42,7 @@ class EmailSettings extends Component
|
|||||||
public function copyFromInstanceSettings()
|
public function copyFromInstanceSettings()
|
||||||
{
|
{
|
||||||
$settings = InstanceSettings::get();
|
$settings = InstanceSettings::get();
|
||||||
|
if ($settings->smtp->enabled) {
|
||||||
$this->model->smtp->enabled = true;
|
$this->model->smtp->enabled = true;
|
||||||
$this->model->smtp->from_address = $settings->smtp->from_address;
|
$this->model->smtp->from_address = $settings->smtp->from_address;
|
||||||
$this->model->smtp->from_name = $settings->smtp->from_name;
|
$this->model->smtp->from_name = $settings->smtp->from_name;
|
||||||
@ -54,6 +55,9 @@ class EmailSettings extends Component
|
|||||||
$this->model->smtp->timeout = $settings->smtp->timeout;
|
$this->model->smtp->timeout = $settings->smtp->timeout;
|
||||||
$this->model->smtp->test_recipients = $settings->smtp->test_recipients;
|
$this->model->smtp->test_recipients = $settings->smtp->test_recipients;
|
||||||
$this->saveModel();
|
$this->saveModel();
|
||||||
|
} else {
|
||||||
|
$this->emit('error', 'Instance SMTP settings are not enabled.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user