diff --git a/composer.json b/composer.json index 2d8eec37..a11e9297 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,6 @@ "lion/exceptions": "^1.3", "lion/files": "^7.1", "lion/helpers": "^4.0", - "lion/mailer": "^6.3", "lion/request": "^6.9", "lion/route": "^11.5", "lion/security": "^10.0", @@ -70,10 +69,8 @@ }, "require-dev": { "lion/test": "^2.1", - "phpmailer/phpmailer": "^6.9", "phpunit/phpunit": "^11.4", - "robiningelbrecht/phpunit-pretty-print": "^1.3", - "symfony/mailer": "^7.1" + "robiningelbrecht/phpunit-pretty-print": "^1.3" }, "suggest": { "ext-gd": "Required to use LionSpreadsheet.", diff --git a/composer.lock b/composer.lock index 392dfe90..72fb3f42 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a155db721d4ad38bb7a60efdf2ffcebc", + "content-hash": "6f7cc5e7aafefdbe43a2f144131972db", "packages": [ { "name": "carbonphp/carbon-doctrine-types", @@ -994,47 +994,6 @@ }, "time": "2024-06-29T18:27:23+00:00" }, - { - "name": "lion/mailer", - "version": "v6.3.0", - "source": { - "type": "git", - "url": "https://github.com/lion-packages/mailer.git", - "reference": "51224e78918e0ab08a572adf79c46e0f880fc178" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lion-packages/mailer/zipball/51224e78918e0ab08a572adf79c46e0f880fc178", - "reference": "51224e78918e0ab08a572adf79c46e0f880fc178", - "shasum": "" - }, - "require": { - "php": ">=8.3" - }, - "require-dev": { - "lion/test": "^2.0", - "phpmailer/phpmailer": "^6.9", - "phpunit/phpunit": "^11.2", - "symfony/mailer": "^7.0", - "symfony/mime": "^6.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Lion\\Mailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Library created to facilitate sending email based on different services", - "support": { - "issues": "https://github.com/lion-packages/mailer/issues", - "source": "https://github.com/lion-packages/mailer/tree/v6.3.0" - }, - "time": "2024-11-01T12:45:36+00:00" - }, { "name": "lion/request", "version": "v6.9.0", @@ -3886,150 +3845,6 @@ } ], "packages-dev": [ - { - "name": "doctrine/lexer", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2024-02-05T11:56:58+00:00" - }, - { - "name": "egulias/email-validator", - "version": "4.0.2", - "source": { - "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2.0 || ^3.0", - "php": ">=8.1", - "symfony/polyfill-intl-idn": "^1.26" - }, - "require-dev": { - "phpunit/phpunit": "^10.2", - "vimeo/psalm": "^5.12" - }, - "suggest": { - "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Egulias\\EmailValidator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails against several RFCs", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "emailvalidation", - "emailvalidator", - "validation", - "validator" - ], - "support": { - "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" - }, - "funding": [ - { - "url": "https://github.com/egulias", - "type": "github" - } - ], - "time": "2023-10-06T06:47:41+00:00" - }, { "name": "filp/whoops", "version": "2.15.4", @@ -4557,87 +4372,6 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "phpmailer/phpmailer", - "version": "v6.9.2", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a7b17b42fa4887c92146243f3d2f4ccb962af17c", - "reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "doctrine/annotations": "^1.2.6 || ^1.13.3", - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.7.2", - "yoast/phpunit-polyfills": "^1.0.4" - }, - "suggest": { - "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", - "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "ext-openssl": "Needed for secure SMTP sending and DKIM signing", - "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", - "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "support": { - "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.2" - }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "time": "2024-10-09T10:07:50+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "11.0.7", @@ -5061,56 +4795,6 @@ ], "time": "2024-10-28T13:07:50+00:00" }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, { "name": "robiningelbrecht/phpunit-pretty-print", "version": "v1.3.1", @@ -6096,409 +5780,6 @@ ], "time": "2024-10-09T05:16:32+00:00" }, - { - "name": "symfony/event-dispatcher", - "version": "v7.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "87254c78dd50721cfd015b62277a8281c5589702" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87254c78dd50721cfd015b62277a8281c5589702", - "reference": "87254c78dd50721cfd015b62277a8281c5589702", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/event-dispatcher-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.6" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8f93aec25d41b72493c6ddff14e916177c9efc50", - "reference": "8f93aec25d41b72493c6ddff14e916177c9efc50", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-18T09:32:20+00:00" - }, - { - "name": "symfony/mailer", - "version": "v7.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/mailer.git", - "reference": "69c9948451fb3a6a4d47dc8261d1794734e76cdd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/69c9948451fb3a6a4d47dc8261d1794734e76cdd", - "reference": "69c9948451fb3a6a4d47dc8261d1794734e76cdd", - "shasum": "" - }, - "require": { - "egulias/email-validator": "^2.1.10|^3|^4", - "php": ">=8.2", - "psr/event-dispatcher": "^1", - "psr/log": "^1|^2|^3", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<6.4", - "symfony/messenger": "<6.4", - "symfony/mime": "<6.4", - "symfony/twig-bridge": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/twig-bridge": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Mailer\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Helps sending emails", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/mailer/tree/v7.1.6" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "symfony/mime", - "version": "v7.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "caa1e521edb2650b8470918dfe51708c237f0598" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/caa1e521edb2650b8470918dfe51708c237f0598", - "reference": "caa1e521edb2650b8470918dfe51708c237f0598", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "conflict": { - "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<6.4", - "symfony/serializer": "<6.4.3|>7.0,<7.0.3" - }, - "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1|^4", - "league/html-to-markdown": "^5.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^6.4|^7.0", - "symfony/property-info": "^6.4|^7.0", - "symfony/serializer": "^6.4.3|^7.0.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Mime\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows manipulating MIME messages", - "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], - "support": { - "source": "https://github.com/symfony/mime/tree/v7.1.6" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-10-25T15:11:02+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", - "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "symfony/polyfill-intl-normalizer": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "theseer/tokenizer", "version": "1.2.3", diff --git a/docker-compose.yml b/docker-compose.yml index 65c22163..e42df7e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,16 +44,6 @@ services: networks: - lion - mailhog: - image: mailhog/mailhog - container_name: bundle-mailhog - restart: unless-stopped - ports: - - "8025:8025" - - "1025:1025" - networks: - - lion - mysql: image: mysql container_name: bundle-mysql @@ -107,12 +97,15 @@ services: PGADMIN_DEFAULT_PASSWORD: lion depends_on: - postgres + volumes: + - pgadmin_data:/var/lib/pgadmin networks: - lion volumes: mysql_data: postgres_data: + pgadmin_data: redis_data: driver: local diff --git a/lion b/lion index 2c153df6..dc7fcc68 100644 --- a/lion +++ b/lion @@ -21,7 +21,6 @@ use Dotenv\Dotenv; use Lion\Bundle\Commands\CommandHandler; use Lion\Database\Driver; use Lion\Files\Store; -use Lion\Mailer\Mailer; /** * ----------------------------------------------------------------------------- @@ -71,37 +70,6 @@ Driver::run([ ], ]); -/** - * ----------------------------------------------------------------------------- - * Start mail service - * ----------------------------------------------------------------------------- - * describe connections to establish connecting to multiple databases - * ----------------------------------------------------------------------------- - **/ - -Mailer::initialize([ - env('MAIL_NAME', 'lion-app') => [ - 'name' => env('MAIL_NAME', 'lion-app'), - 'type' => env('MAIL_TYPE', 'symfony'), - 'host' => env('MAIL_HOST', 'mailhog'), - 'username' => env('MAIL_USER_NAME', 'lion-app'), - 'password' => env('MAIL_PASSWORD', 'lion'), - 'port' => (int) env('MAIL_PORT', 1025), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'debug' => env('MAIL_DEBUG', false) - ], - env('MAIL_NAME_SUPP', 'lion-app') => [ - 'name' => env('MAIL_NAME_SUPP', 'lion-app'), - 'type' => env('MAIL_TYPE_SUPP', 'symfony'), - 'host' => env('MAIL_HOST_SUPP', 'mailhog'), - 'username' => env('MAIL_USER_NAME_SUPP', 'lion-app'), - 'password' => env('MAIL_PASSWORD_SUPP', 'lion'), - 'port' => (int) env('MAIL_PORT_SUPP', 1025), - 'encryption' => env('MAIL_ENCRYPTION_SUPP', 'tls'), - 'debug' => env('MAIL_DEBUG_SUPP', false) - ] -], env('MAIL_NAME', 'lion-app')); - /** * ----------------------------------------------------------------------------- * Run The lion Application diff --git a/routes/web.php b/routes/web.php index 029c3116..8a0ffce6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -68,37 +68,6 @@ ] ]); -/** - * ----------------------------------------------------------------------------- - * Start mail service - * ----------------------------------------------------------------------------- - * describe connections to establish connecting to multiple databases - * ----------------------------------------------------------------------------- - **/ - -Mailer::initialize([ - env('MAIL_NAME', 'lion-app') => [ - 'name' => env('MAIL_NAME', 'lion-app'), - 'type' => env('MAIL_TYPE', 'symfony'), - 'host' => env('MAIL_HOST', 'mailhog'), - 'username' => env('MAIL_USER_NAME', 'lion-app'), - 'password' => env('MAIL_PASSWORD', 'lion'), - 'port' => (int) env('MAIL_PORT', 1025), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'debug' => env('MAIL_DEBUG', false) - ], - env('MAIL_NAME_SUPP', 'lion-app') => [ - 'name' => env('MAIL_NAME_SUPP', 'lion-app'), - 'type' => env('MAIL_TYPE_SUPP', 'symfony'), - 'host' => env('MAIL_HOST_SUPP', 'mailhog'), - 'username' => env('MAIL_USER_NAME_SUPP', 'lion-app'), - 'password' => env('MAIL_PASSWORD_SUPP', 'lion'), - 'port' => (int) env('MAIL_PORT_SUPP', 1025), - 'encryption' => env('MAIL_ENCRYPTION_SUPP', 'tls'), - 'debug' => env('MAIL_DEBUG_SUPP', false) - ] -], env('MAIL_NAME', 'lion-app')); - /** * ----------------------------------------------------------------------------- * Web Routes diff --git a/tests/MailhogTest.php b/tests/MailhogTest.php deleted file mode 100644 index e908c39f..00000000 --- a/tests/MailhogTest.php +++ /dev/null @@ -1,55 +0,0 @@ -runMailer(); - } - - /** - * @throws MailerAccountConfigException - */ - public function testMail(): void - { - $this->assertTrue( - Mailer::account($_ENV['MAIL_NAME']) - ->subject('Test Priority') - ->from('sleon@dev.com', 'Sleon') - ->addAddress('jjerez@dev.com', 'Jjerez') - ->body('Send Mailer') - ->priority(Priority::HIGH) - ->send() - ); - } - - /** - * @throws MailerAccountConfigException - */ - public function testMailSupp(): void - { - $this->assertTrue( - Mailer::account($_ENV['MAIL_NAME_SUPP']) - ->subject('Test Priority') - ->from('sleon@dev.com', 'Sleon') - ->addAddress('jjerez@dev.com', 'Jjerez') - ->body('Send Mailer') - ->priority(Priority::HIGH) - ->send() - ); - } -}