Mailing Flashcards
1
Q
.env setting
A
MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com [change] MAIL_PORT=465 [change] MAIL_USERNAME=Your gmail MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS=Your gmail MAIL_FROM_NAME="${APP_NAME}"
2
Q
First step ,Mail Creation
A
in terminal
php artisan make:mail MailName
3
Q
Mail File input in web.php
A
Use Illuminate/Support/Facades/mail
4
Q
Sending Mail
A
$user = User::find(id) Mail::to($user)->send(new MailName());