From 2d4c7241efa44f1f955f579106c432fdf5ad0da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Carodej?= Date: Fri, 1 Apr 2022 17:18:51 +0200 Subject: [PATCH] test smtp connection before set up --- composer.lock | 188 +++++++++--------- config/vuefilemanager.php | 2 +- public/mix-manifest.json | 4 +- resources/css/tailwind.css | 3 + resources/js/components/FilesView/Alert.vue | 2 +- .../AppSettingsTabs/Environment.vue | 18 +- .../js/views/SetupWizard/EnvironmentSetup.vue | 7 +- resources/views/mails/test-mail.blade.php | 1 + .../StoreEmailCredentialsController.php | 37 ++++ src/Domain/Settings/Mail/TestMail.php | 29 +++ .../StoreEnvironmentSettingsController.php | 37 ++++ 11 files changed, 222 insertions(+), 106 deletions(-) create mode 100644 resources/views/mails/test-mail.blade.php create mode 100644 src/Domain/Settings/Mail/TestMail.php diff --git a/composer.lock b/composer.lock index a9e1cc25..831bbb8c 100644 --- a/composer.lock +++ b/composer.lock @@ -280,16 +280,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.215.2", + "version": "3.218.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "8ddbc5242ec59a22b2c4704867e028343c6d8ade" + "reference": "714ed40bc2e60d4af907eb2d41fbfb75f980d2e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8ddbc5242ec59a22b2c4704867e028343c6d8ade", - "reference": "8ddbc5242ec59a22b2c4704867e028343c6d8ade", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/714ed40bc2e60d4af907eb2d41fbfb75f980d2e2", + "reference": "714ed40bc2e60d4af907eb2d41fbfb75f980d2e2", "shasum": "" }, "require": { @@ -365,9 +365,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.215.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.218.0" }, - "time": "2022-03-22T19:02:23+00:00" + "time": "2022-03-31T18:20:58+00:00" }, { "name": "bacon/bacon-qr-code", @@ -507,16 +507,16 @@ }, { "name": "brianium/paratest", - "version": "v6.4.3", + "version": "v6.4.4", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "5123a31dbf0b5deeaec17b00c0c5f31732c14483" + "reference": "589cdb23728b2a19872945580b95d8aa2c6619da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/5123a31dbf0b5deeaec17b00c0c5f31732c14483", - "reference": "5123a31dbf0b5deeaec17b00c0c5f31732c14483", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/589cdb23728b2a19872945580b95d8aa2c6619da", + "reference": "589cdb23728b2a19872945580b95d8aa2c6619da", "shasum": "" }, "require": { @@ -579,7 +579,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v6.4.3" + "source": "https://github.com/paratestphp/paratest/tree/v6.4.4" }, "funding": [ { @@ -591,7 +591,7 @@ "type": "paypal" } ], - "time": "2022-02-18T13:23:47+00:00" + "time": "2022-03-28T07:55:11+00:00" }, { "name": "brick/math", @@ -2170,16 +2170,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -2220,9 +2220,9 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "fig/http-message-util", @@ -3227,16 +3227,16 @@ }, { "name": "laravel/fortify", - "version": "v1.11.2", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/laravel/fortify.git", - "reference": "35c44f36f2a93fb7d3d8b38d6b7794913c69d414" + "reference": "a6caadc80e348755de0e1da221a6253d9f2c48f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/fortify/zipball/35c44f36f2a93fb7d3d8b38d6b7794913c69d414", - "reference": "35c44f36f2a93fb7d3d8b38d6b7794913c69d414", + "url": "https://api.github.com/repos/laravel/fortify/zipball/a6caadc80e348755de0e1da221a6253d9f2c48f9", + "reference": "a6caadc80e348755de0e1da221a6253d9f2c48f9", "shasum": "" }, "require": { @@ -3286,20 +3286,20 @@ "issues": "https://github.com/laravel/fortify/issues", "source": "https://github.com/laravel/fortify" }, - "time": "2022-03-04T20:27:28+00:00" + "time": "2022-03-29T14:37:05+00:00" }, { "name": "laravel/framework", - "version": "v9.5.1", + "version": "v9.6.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "35be2599c9ac3d58bf1578895c2e85ea4848a0d7" + "reference": "47940a1a8774b96696ed57e6736ccea4a880c057" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/35be2599c9ac3d58bf1578895c2e85ea4848a0d7", - "reference": "35be2599c9ac3d58bf1578895c2e85ea4848a0d7", + "url": "https://api.github.com/repos/laravel/framework/zipball/47940a1a8774b96696ed57e6736ccea4a880c057", + "reference": "47940a1a8774b96696ed57e6736ccea4a880c057", "shasum": "" }, "require": { @@ -3465,24 +3465,25 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-03-15T14:41:19+00:00" + "time": "2022-03-29T14:41:26+00:00" }, { "name": "laravel/sanctum", - "version": "v2.14.2", + "version": "v2.15.0", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66" + "reference": "5be160413b6f37dcf8758663edeab12d0e806f56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/dc5d749ba9bfcfd68d8f5c272238f88bea223e66", - "reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/5be160413b6f37dcf8758663edeab12d0e806f56", + "reference": "5be160413b6f37dcf8758663edeab12d0e806f56", "shasum": "" }, "require": { "ext-json": "*", + "illuminate/console": "^6.9|^7.0|^8.0|^9.0", "illuminate/contracts": "^6.9|^7.0|^8.0|^9.0", "illuminate/database": "^6.9|^7.0|^8.0|^9.0", "illuminate/support": "^6.9|^7.0|^8.0|^9.0", @@ -3529,20 +3530,20 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2022-02-16T14:40:23+00:00" + "time": "2022-03-28T13:53:05+00:00" }, { "name": "laravel/scout", - "version": "v9.4.5", + "version": "v9.4.6", "source": { "type": "git", "url": "https://github.com/laravel/scout.git", - "reference": "ac962d2e052e90ca271e9bb1b30229ed870c4963" + "reference": "c4b697218ea7abe89894312caf86668b1f169233" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/scout/zipball/ac962d2e052e90ca271e9bb1b30229ed870c4963", - "reference": "ac962d2e052e90ca271e9bb1b30229ed870c4963", + "url": "https://api.github.com/repos/laravel/scout/zipball/c4b697218ea7abe89894312caf86668b1f169233", + "reference": "c4b697218ea7abe89894312caf86668b1f169233", "shasum": "" }, "require": { @@ -3562,8 +3563,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "algolia/algoliasearch-client-php": "Required to use the Algolia engine (^2.2).", - "meilisearch/meilisearch-php": "Required to use the MeiliSearch engine (^0.17)." + "algolia/algoliasearch-client-php": "Required to use the Algolia engine (^3.2).", + "meilisearch/meilisearch-php": "Required to use the MeiliSearch engine (^0.23)." }, "type": "library", "extra": { @@ -3601,7 +3602,7 @@ "issues": "https://github.com/laravel/scout/issues", "source": "https://github.com/laravel/scout" }, - "time": "2022-02-22T16:20:15+00:00" + "time": "2022-03-29T15:56:47+00:00" }, { "name": "laravel/serializable-closure", @@ -3733,16 +3734,16 @@ }, { "name": "laravel/tinker", - "version": "v2.7.1", + "version": "v2.7.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "1e2d500585a4e546346fadd3adc6f9c1a97e15f4" + "reference": "dff39b661e827dae6e092412f976658df82dbac5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/1e2d500585a4e546346fadd3adc6f9c1a97e15f4", - "reference": "1e2d500585a4e546346fadd3adc6f9c1a97e15f4", + "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", + "reference": "dff39b661e827dae6e092412f976658df82dbac5", "shasum": "" }, "require": { @@ -3795,9 +3796,9 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.7.1" + "source": "https://github.com/laravel/tinker/tree/v2.7.2" }, - "time": "2022-03-15T15:25:01+00:00" + "time": "2022-03-23T12:38:24+00:00" }, { "name": "laravel/ui", @@ -5304,16 +5305,16 @@ }, { "name": "paragonie/sodium_compat", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/paragonie/sodium_compat.git", - "reference": "c59cac21abbcc0df06a3dd18076450ea4797b321" + "reference": "ac994053faac18d386328c91c7900f930acadf1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/c59cac21abbcc0df06a3dd18076450ea4797b321", - "reference": "c59cac21abbcc0df06a3dd18076450ea4797b321", + "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/ac994053faac18d386328c91c7900f930acadf1e", + "reference": "ac994053faac18d386328c91c7900f930acadf1e", "shasum": "" }, "require": { @@ -5384,9 +5385,9 @@ ], "support": { "issues": "https://github.com/paragonie/sodium_compat/issues", - "source": "https://github.com/paragonie/sodium_compat/tree/v1.17.0" + "source": "https://github.com/paragonie/sodium_compat/tree/v1.17.1" }, - "time": "2021-08-10T02:43:50+00:00" + "time": "2022-03-23T19:32:04+00:00" }, { "name": "phar-io/manifest", @@ -5663,16 +5664,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -5707,9 +5708,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpoption/phpoption", @@ -6999,25 +7000,24 @@ }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", "shasum": "" }, "require": { "brick/math": "^0.8 || ^0.9", + "ext-ctype": "*", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.0", + "ramsey/collection": "^1.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -7054,9 +7054,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "4.x-dev" - }, "captainhook": { "force-install": true } @@ -7081,7 +7078,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.3" + "source": "https://github.com/ramsey/uuid/tree/4.3.1" }, "funding": [ { @@ -7093,7 +7090,7 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2022-03-27T21:42:02+00:00" }, { "name": "ratchet/rfc6455", @@ -9683,16 +9680,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.117.0", + "version": "v7.121.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "c9d40524c63f3c5042d704f88a60f49a349b1221" + "reference": "e36e7afb71ae5511aae23b52dca712a0ef06d981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/c9d40524c63f3c5042d704f88a60f49a349b1221", - "reference": "c9d40524c63f3c5042d704f88a60f49a349b1221", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/e36e7afb71ae5511aae23b52dca712a0ef06d981", + "reference": "e36e7afb71ae5511aae23b52dca712a0ef06d981", "shasum": "" }, "require": { @@ -9737,9 +9734,9 @@ ], "support": { "issues": "https://github.com/stripe/stripe-php/issues", - "source": "https://github.com/stripe/stripe-php/tree/v7.117.0" + "source": "https://github.com/stripe/stripe-php/tree/v7.121.0" }, - "time": "2022-03-18T18:16:15+00:00" + "time": "2022-03-30T15:51:23+00:00" }, { "name": "symfony/console", @@ -13248,16 +13245,16 @@ }, { "name": "composer/composer", - "version": "2.3.0-RC2", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "36dc875e1c6d5ce9411c78aae22b33ac24c86e13" + "reference": "c3777ea50f5ad561d4796b42fba4d180bb45cf77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/36dc875e1c6d5ce9411c78aae22b33ac24c86e13", - "reference": "36dc875e1c6d5ce9411c78aae22b33ac24c86e13", + "url": "https://api.github.com/repos/composer/composer/zipball/c3777ea50f5ad561d4796b42fba4d180bb45cf77", + "reference": "c3777ea50f5ad561d4796b42fba4d180bb45cf77", "shasum": "" }, "require": { @@ -13333,7 +13330,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.3.0-RC2" + "source": "https://github.com/composer/composer/tree/2.3.2" }, "funding": [ { @@ -13349,7 +13346,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T12:20:49+00:00" + "time": "2022-03-30T18:45:25+00:00" }, { "name": "composer/metadata-minifier", @@ -14082,23 +14079,24 @@ }, { "name": "seld/jsonlint", - "version": "1.8.3", + "version": "1.8.9", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" + "reference": "d9a308b84277a7dd651ba89bf5ed37b88497b171" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/d9a308b84277a7dd651ba89bf5ed37b88497b171", + "reference": "d9a308b84277a7dd651ba89bf5ed37b88497b171", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpstan/phpstan": "^0.12.59", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ "bin/jsonlint" @@ -14129,7 +14127,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.9" }, "funding": [ { @@ -14141,7 +14139,7 @@ "type": "tidelift" } ], - "time": "2020-11-11T09:19:24+00:00" + "time": "2022-03-31T11:30:35+00:00" }, { "name": "seld/phar-utils", @@ -14319,16 +14317,16 @@ }, { "name": "spatie/ignition", - "version": "1.2.6", + "version": "1.2.7", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "be24d33a9de271638314924b5da85e168e4148e4" + "reference": "2f059cf42b48f7c522efbba1c05ad59fc2c1a3f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/be24d33a9de271638314924b5da85e168e4148e4", - "reference": "be24d33a9de271638314924b5da85e168e4148e4", + "url": "https://api.github.com/repos/spatie/ignition/zipball/2f059cf42b48f7c522efbba1c05ad59fc2c1a3f2", + "reference": "2f059cf42b48f7c522efbba1c05ad59fc2c1a3f2", "shasum": "" }, "require": { @@ -14385,7 +14383,7 @@ "type": "github" } ], - "time": "2022-03-23T11:02:14+00:00" + "time": "2022-03-29T08:48:34+00:00" }, { "name": "spatie/laravel-ignition", diff --git a/config/vuefilemanager.php b/config/vuefilemanager.php index e2eb39c3..238bccc3 100644 --- a/config/vuefilemanager.php +++ b/config/vuefilemanager.php @@ -1,7 +1,7 @@ '2.0.10', + 'version' => '2.0.11', 'is_demo' => env('APP_DEMO', false), diff --git a/public/mix-manifest.json b/public/mix-manifest.json index f8815be0..81f77120 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -42,7 +42,7 @@ "/chunks/app-settings.js": "/chunks/app-settings.js?id=55da23af2b076069", "/chunks/app-appearance.js": "/chunks/app-appearance.js?id=a694a01f3641712c", "/chunks/app-index.js": "/chunks/app-index.js?id=efdbfa062749ca00", - "/chunks/app-environment.js": "/chunks/app-environment.js?id=9be9c6b1a20b00cb", + "/chunks/app-environment.js": "/chunks/app-environment.js?id=e73ab59f2d81adb0", "/chunks/app-others.js": "/chunks/app-others.js?id=16dc948aa2205189", "/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=1cfffc99465b9a7a", "/chunks/app-adsense.js": "/chunks/app-adsense.js?id=a5dc9e715f8561bd", @@ -72,5 +72,5 @@ "/chunks/invitation.js": "/chunks/invitation.js?id=9ed8456c9d6d5ce1", "/css/tailwind.css": "/css/tailwind.css", "/css/app.css": "/css/app.css", - "/chunks/environment.js": "/chunks/environment.js?id=520e1f9745f40ada" + "/chunks/environment.js": "/chunks/environment.js?id=ab5382f4452a258a" } diff --git a/resources/css/tailwind.css b/resources/css/tailwind.css index d78cd814..ab1802e2 100644 --- a/resources/css/tailwind.css +++ b/resources/css/tailwind.css @@ -38,4 +38,7 @@ .overflow-initial { overflow: initial; } + .overflow-anywhere { + overflow-wrap: anywhere; + } } diff --git a/resources/js/components/FilesView/Alert.vue b/resources/js/components/FilesView/Alert.vue index 8b9c36dd..536bb19f 100644 --- a/resources/js/components/FilesView/Alert.vue +++ b/resources/js/components/FilesView/Alert.vue @@ -13,7 +13,7 @@

{{ title }}

-

+

{{ message }}

diff --git a/resources/js/views/Admin/AppSettings/AppSettingsTabs/Environment.vue b/resources/js/views/Admin/AppSettings/AppSettingsTabs/Environment.vue index 20cbe2de..4047f237 100644 --- a/resources/js/views/Admin/AppSettings/AppSettingsTabs/Environment.vue +++ b/resources/js/views/Admin/AppSettings/AppSettingsTabs/Environment.vue @@ -519,7 +519,7 @@ export default { wasabi: 'https://s3.' + val + '.wasabisys.com', backblaze: 'https://s3.' + val + '.backblazeb2.com', oss: 'https://' + val + '.aliyuncs.com', - s3: 'https://s3.amazonaws.com', + s3: 'https://s3.' + val + '.amazonaws.com', other: undefined, }[this.storage.driver] }, @@ -947,7 +947,6 @@ export default { }) }) .catch((error) => { - if (error.response.status === 401 && error.response.data.type === 's3-connection-error') { events.$emit('alert:open', { title: 'S3 Connection Error - Wrong Credentials or Not Permitted', @@ -990,10 +989,17 @@ export default { }) }) .catch((error) => { - events.$emit('alert:open', { - title: this.$t('popup_error.title'), - message: this.$t('popup_error.message'), - }) + if (error.response.status === 401 && error.response.data.type === 'mailer-connection-error') { + events.$emit('alert:open', { + title: 'Mailer Connection Error - Wrong Credentials', + message: error.response.data.message, + }) + } else { + events.$emit('toaster', { + type: 'danger', + message: this.$t('popup_error.title'), + }) + } }) .finally(() => { this.isSendingEmailForm = false diff --git a/resources/js/views/SetupWizard/EnvironmentSetup.vue b/resources/js/views/SetupWizard/EnvironmentSetup.vue index d447d5f6..1f054938 100644 --- a/resources/js/views/SetupWizard/EnvironmentSetup.vue +++ b/resources/js/views/SetupWizard/EnvironmentSetup.vue @@ -581,7 +581,7 @@ export default { wasabi: 'https://s3.' + val + '.wasabisys.com', backblaze: 'https://s3.' + val + '.backblazeb2.com', oss: 'https://' + val + '.aliyuncs.com', - s3: 'https://s3.amazonaws.com', + s3: 'https://s3.' + val + '.amazonaws.com', other: undefined, }[this.storage.driver] }, @@ -988,6 +988,11 @@ export default { title: 'S3 Connection Error - Wrong Credentials or Not Permitted', message: error.response.data.message, }) + } else if (error.response.status === 401 && error.response.data.type === 'mailer-connection-error') { + events.$emit('alert:open', { + title: 'Mailer Connection Error - Wrong Credentials', + message: error.response.data.message, + }) } else { this.isError = true } diff --git a/resources/views/mails/test-mail.blade.php b/resources/views/mails/test-mail.blade.php new file mode 100644 index 00000000..e3d7ec9d --- /dev/null +++ b/resources/views/mails/test-mail.blade.php @@ -0,0 +1 @@ +This is the test. \ No newline at end of file diff --git a/src/Domain/Settings/Controllers/StoreEmailCredentialsController.php b/src/Domain/Settings/Controllers/StoreEmailCredentialsController.php index 4211bcae..f2d0d7a9 100644 --- a/src/Domain/Settings/Controllers/StoreEmailCredentialsController.php +++ b/src/Domain/Settings/Controllers/StoreEmailCredentialsController.php @@ -1,9 +1,13 @@ runningUnitTests()) { + // Test smtp server + if ($request->input('mailDriver') === 'smtp') { + try { + // Get credentials + $credentials = [ + 'smtp' => [ + 'driver' => 'smtp', + 'host' => $request->input('smtp.host'), + 'port' => $request->input('smtp.port'), + 'username' => $request->input('smtp.username'), + 'password' => $request->input('smtp.password'), + 'encryption' => $request->input('smtp.encryption') ?? '', + 'from.address' => $request->input('smtp.email') ?? $request->input('smtp.username'), + 'from.name' => $request->input('smtp.email') ?? $request->input('smtp.username'), + ], + ]; + + // Set temporary mail connection + config(['mail' => $credentials['smtp']]); + + $sender = $request->input('smtp.email') ?? $request->input('smtp.username'); + + // Send test email + Mail::to('test@hi5ve.digital')->send(new TestMail($sender)); + } catch (TransportException|LogicException $error) { + return response([ + 'type' => 'mailer-connection-error', + 'title' => 'Mail Connection Error', + 'message' => $error->getMessage(), + ], 401); + } + } + $mail = [ 'log' => [ 'MAIL_DRIVER' => 'log', diff --git a/src/Domain/Settings/Mail/TestMail.php b/src/Domain/Settings/Mail/TestMail.php new file mode 100644 index 00000000..c72d5ebd --- /dev/null +++ b/src/Domain/Settings/Mail/TestMail.php @@ -0,0 +1,29 @@ +from($this->emailFrom, 'Test') + ->subject('Test Mail') + ->view('mails.test-mail'); + } +} diff --git a/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php b/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php index 47a2d5d0..fdb6fd31 100644 --- a/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php +++ b/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php @@ -1,13 +1,17 @@ input('mailDriver') === 'smtp') { + try { + // Get credentials + $credentials = [ + 'smtp' => [ + 'driver' => 'smtp', + 'host' => $request->input('smtp.host'), + 'port' => $request->input('smtp.port'), + 'username' => $request->input('smtp.username'), + 'password' => $request->input('smtp.password'), + 'encryption' => $request->input('smtp.encryption') ?? '', + 'from.address' => $request->input('smtp.email') ?? $request->input('smtp.username'), + 'from.name' => $request->input('smtp.email') ?? $request->input('smtp.username'), + ], + ]; + + // Set temporary mail connection + config(['mail' => $credentials['smtp']]); + + $sender = $request->input('smtp.email') ?? $request->input('smtp.username'); + + // Send test email + Mail::to('test@hi5ve.digital')->send(new TestMail($sender)); + } catch (TransportException|LogicException $error) { + return response([ + 'type' => 'mailer-connection-error', + 'title' => 'Mail Connection Error', + 'message' => $error->getMessage(), + ], 401); + } + } + $setup = [ 'broadcasting' => [ 'pusher' => [