madeinua / laravel-phpmailer
PHPMailer transport for Laravel
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 1
Type:project
Requires
- php: ^8.0.0
- laravel/framework: ^8.0|^9.0
- phpmailer/phpmailer: ^6.6
This package is auto-updated.
Last update: 2025-04-27 20:26:26 UTC
README
About
This package provides a simple way to use PHPMailer with Laravel to handle sending emails.
Installation
You can install the package via composer:
composer require "madeinua/laravel-phpmailer"
or manually add the following to your composer.json
file:
"madeinua/browser-console": "^1.0"
You also need to publish the service provider:
php artisan vendor:publish --provider="LaravelPHPMailer\PHPMailerServiceProvider" --tag="transporter-config"
or by adding the provider to the config/app.php
file:
'providers' => [ ... // Illuminate\Mail\MailServiceProvider::class, LaravelPHPMailer\PHPMailerServiceProvider::class, ],
Then in the config/mail.php
, under mailers
, you need to add a new entry:
'mailers' => [ ... 'phpmailer' => [ 'transport' => 'phpmailer' ] ],
Usage
When the package is installed and configured, all emails will be sent using PHPMailer:
Mail::to($request->user()) ->cc($moreUsers) ->bcc($evenMoreUsers) ->send(new OrderShipped($order));