ikechukwukalu / dynamicmailconfig
A laravel package that enables each user to send emails through your platform, using their own unique email configuration
Installs: 1 947
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 1
Open Issues: 1
Requires
- php: >=7.3
- illuminate/console: ^8.0|^9.0|^10.0|^11.0
- illuminate/database: ^8.0|^9.0|^10.0|^11.0
- illuminate/http: ^8.0|^9.0|^10.0|^11.0
- illuminate/routing: ^8.0|^9.0|^10.0|^11.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- mockery/mockery: ^1.0|^2.0
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- php-parallel-lint/php-parallel-lint: dev-develop
- phpunit/phpunit: ^9.0|^10.0|^11.0
README
A laravel package that enables each user to send emails through your app using their own unique email configuration.
REQUIREMENTS
- PHP 8.0+
- Laravel 9+
STEPS TO INSTALL
composer require ikechukwukalu/dynamicmailconfig
php artisan vendor:publish --tag=dmc-migrations
php artisan migrate
Hash Database Fields
MAIL_FIELDS_HASH=true
How To Use
use Illuminate\Support\Facades\Route; Route::middleware(['dynamic.mail.config'])->group(function () { Route::post('/', [\namespace\SomethingController::class, 'functionName']); }); Route::post('/', [\namespace\SomethingController::class, 'functionName'])->middleware('dynamic.mail.config');
Model
use Ikechukwukalu\Dynamicmailconfig\Models\UserEmailConfiguration; protected $hidden = [ 'name', 'address', 'driver', 'host', 'port', 'encryption', 'username', 'password' ];
NOTE
The default mail configuration will be used if a user does not have a custom mail configuration in place.
PUBLISH CONFIG
php artisan vendor:publish --tag=dmc-config
LICENSE
The DMC package is an open-sourced software licensed under the MIT license.