Level 6
Set your MAIL_ENCRYPTION config value to "tls"
i got this error:
Swift_TransportException
Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first. w9sm2062655wmi.0 - gsmtp
"
dev :
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=myAccountPassword
MAIL_ENCRYPTION=null
controller:
public function sendEmail(){
Mail::to("[email protected]")->send(new Invoice('somthing'));
}
mailable class:
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class Invoice extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('Email.Order');
}
}
Route:
Route::get('/sendEmail','mycontroller@sendEmail');
mail.blade.php:
<h1>welcome</h1>
any idea ?
@moukbel I think that explains it then - you need to use an application specific password since you have 2FA enabled
Please or to participate in this conversation.