Illuminate\Mail
Estimated reading time: 1 minuteIlluminate\Mail
- Illuminate\mail
-
https://scotch.io/tutorials/ultimate-guide-on-sending-email-in-laravel
- mail laracast video
mail process
make:mail WelcomeMailHere
- http/mail/welcome/WelcomeMailHere.php
public variable auto accessable by view
-
pass data by ->with['name'=>$this->user]
andaccess
by view$name
variable -
public $name; public __construct($name) { $this->name = $name; } function build(){ return $this->from('your_company_email') ->subject('subject') ->view('parrot.mails.welcome') ->with(['user'=>$this->name]); }
- http/mail/welcome/WelcomeMailHere.php
controller
use mailNamespace (WelcomeMailHere); $data = new WelcomeMailHere($pass_data); Mail::to('[email protected]')->send($data)
-
blade
- configure viewConfig
- set path
realpath(base_path('parrot'))
real server
- mailchip
- mailgun
- sparkpost
- mailjet
- amazon ses
- sendgrid