I'm trying to send an email using a Laravel Mail, following everything on the documentation, below is my mail.php
'default' => env('MAIL_MAILER', 'smtp'),
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
],
'ses' => [
'transport' => 'ses',
],
'mailgun' => [
'transport' => 'mailgun',
],
'postmark' => [
'transport' => 'postmark',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
],
and tried just using the php mail by setting up on .env mail part to NULL
MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=myemail@domain.com
MAIL_FROM_NAME="${APP_NAME}"
and tried to send
Mail::to('drako@domain.com')
->bcc( app('config')->get('mail')['bcc'])
->send(new Get_a_quote($data));
if(count(Mail::failures()) > 0){
return false;
}else{
return true;
}
but my attempt returns an error
Unable to resolve NULL driver for [Illuminate\Mail\TransportManager].
any help, ideas is greatly appreciated.