I use Lumen7 (based on Laravel7) as framework for my projekt. I tried to install the mailer, but it doesn't work.
I did the following steps:
- Installed illuminate/mail via
composer require illuminate/mail:7 - Added the following to bootstrap/app.php
$app->register(Illuminate\Mail\MailServiceProvider::class);
$app->configure('mail');
$app->alias('mail.manager', Illuminate\Mail\MailManager::class);
$app->alias('mail.manager', Illuminate\Contracts\Mail\Factory::class);
$app->alias('mailer', Illuminate\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
Copied the mail.php from https://github.com/laravel/laravel/blob/master/config/mail.php to config/mail.php
Added the following to my .env
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello@example.com
MAIL_FROM_NAME="Example app"
When I try to generate my mailable via php artisan make:mail MyMailable, then I get the following error: Command "make:mail" is not defined.
When I use php artisan, then I don't see mail in the command list of make, just the following make commands:
make
make:migration Create a new migration file
make:seeder Create a new seeder class
I have no idea what the issue is, hopefully someone can help me.