mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
prefix all smtp fields with mail_
This commit is contained in:
parent
3ffb600117
commit
68a84df0dd
@ -80,8 +80,8 @@ class SetupController extends Controller
|
||||
'REQUIRE_HTTPS' => $request->input('https') ? 'true' : 'false',
|
||||
'APP_DEBUG' => $request->input('debug') ? 'true' : 'false',
|
||||
|
||||
'DB_HOST1' => $request->input('host'),
|
||||
'DB_DATABASE1' => $request->input('database'),
|
||||
'DB_HOST1' => $request->input('db_host'),
|
||||
'DB_DATABASE1' => $request->input('db_database'),
|
||||
'DB_USERNAME1' => $request->input('db_username'),
|
||||
'DB_PASSWORD1' => $request->input('db_password'),
|
||||
|
||||
@ -166,6 +166,8 @@ class SetupController extends Controller
|
||||
*/
|
||||
public function checkMail(CheckMailRequest $request)
|
||||
{
|
||||
info($request->all());
|
||||
|
||||
try {
|
||||
$response_array = SystemHealth::testMailServer($request);
|
||||
|
||||
|
@ -36,14 +36,13 @@ class CheckMailRequest extends Request
|
||||
info($this->driver);
|
||||
|
||||
return [
|
||||
'driver' => ['required', 'in:smtp,mail,sendmail,log'],
|
||||
'from_name' => ['required_unless:driver,log'],
|
||||
'from_address' => ['required_unless:driver,log'],
|
||||
'username' => ['required_unless:driver,log'],
|
||||
'host' => ['required_unless:driver,log'],
|
||||
'port' => ['required_unless:driver,log'],
|
||||
'encryption' => ['required_unless:driver,log'],
|
||||
'password' => ['required_unless:driver,log'],
|
||||
'mail_driver' => 'required',
|
||||
'encryption' => 'required_unless:mail_driver,log',
|
||||
'mail_host' => 'required_unless:mail_driver,log',
|
||||
'mail_username' => 'required_unless:mail_driver,log',
|
||||
'mail_name' => 'required_unless:mail_driver,log',
|
||||
'mail_address' => 'required_unless:mail_driver,log',
|
||||
'mail_password' => 'required_unless:mail_driver,log',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -210,14 +210,14 @@ class SystemHealth
|
||||
}
|
||||
|
||||
if ($request && $request instanceof CheckMailRequest) {
|
||||
config(['mail.driver' => $request->input('driver')]);
|
||||
config(['mail.host' => $request->input('host')]);
|
||||
config(['mail.port' => $request->input('port')]);
|
||||
config(['mail.from.address' => $request->input('from_address')]);
|
||||
config(['mail.from.name' => $request->input('from_name')]);
|
||||
config(['mail.driver' => $request->input('mail_driver')]);
|
||||
config(['mail.host' => $request->input('mail_host')]);
|
||||
config(['mail.port' => $request->input('mail_port')]);
|
||||
config(['mail.from.address' => $request->input('mail_address')]);
|
||||
config(['mail.from.name' => $request->input('mail_name')]);
|
||||
config(['mail.encryption' => $request->input('encryption')]);
|
||||
config(['mail.username' => $request->input('username')]);
|
||||
config(['mail.password' => $request->input('password')]);
|
||||
config(['mail.username' => $request->input('mail_username')]);
|
||||
config(['mail.password' => $request->input('mail_password')]);
|
||||
}
|
||||
|
||||
try {
|
||||
|
14
resources/js/setup/setup.js
vendored
14
resources/js/setup/setup.js
vendored
@ -39,17 +39,17 @@ class Setup {
|
||||
|
||||
handleSmtpCheck() {
|
||||
let data = {
|
||||
driver: document.querySelector('select[name="mail_driver"]').value,
|
||||
from_name: document.querySelector('input[name="mail_name"]').value,
|
||||
from_address: document.querySelector('input[name="mail_address"]')
|
||||
mail_driver: document.querySelector('select[name="mail_driver"]').value,
|
||||
mail_name: document.querySelector('input[name="mail_name"]').value,
|
||||
mail_address: document.querySelector('input[name="mail_address"]')
|
||||
.value,
|
||||
username: document.querySelector('input[name="mail_username"]')
|
||||
mail_username: document.querySelector('input[name="mail_username"]')
|
||||
.value,
|
||||
host: document.querySelector('input[name="mail_host"]').value,
|
||||
port: document.querySelector('input[name="mail_port"]').value,
|
||||
mail_host: document.querySelector('input[name="mail_host"]').value,
|
||||
mail_port: document.querySelector('input[name="mail_port"]').value,
|
||||
encryption: document.querySelector('select[name="encryption"]')
|
||||
.value,
|
||||
password: document.querySelector('input[name="mail_password"]')
|
||||
mail_password: document.querySelector('input[name="mail_password"]')
|
||||
.value,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user