In forgot password laravel sends email which gives error like :
Swift_TransportException in AbstractSmtpTransport.php line 162:
Cannot send message without a sender address
i already have set my mail account details in .env
and mail.php
both.
My .env :
MAIL_DRIVER=smtp
MAIL_HOST=smtp-mail.outlook.com
MAIL_PORT=587
MAIL_USERNAME=raval_himanshu@live.in
MAIL_PASSWORD=pass
MAIL_ENCRYPTION=tls
and my mail.php is
<?php
return [
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp-mail.outlook.com'),
'port' => env('MAIL_PORT', 587),
'from' => ['raval_himanshu@live.in' => null, 'Himanshu Raval' => null],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('raval_himanshu@live.in'),
'sendmail' => '/usr/sbin/sendmail -bs',
];
i have tried php artisan config:cache
too but after that it gives same error.