当前位置:网站首页>PHP laravel8 send email
PHP laravel8 send email
2022-06-11 06:16:00 【Results of persistence and effort】
First step

The second step

The third step stay .env The following are found in the configuration

Step four Plain text mode

Step five Rich text mode
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Mail;
// Introduce these two classes , This is a laravel8 Self contained
//send The first parameter is the template file , Because it's rich text mail , The template file is placed in resources->views Next
//send The second parameter is the variable to be passed into the template , Template variables must be arrays
//send The third parameter is who to send and what the subject is
Mail::send('admin.mail.mail',$array,function (Message $message) use ($array){
// To whom , Real email address
$message->to($array['email']);
// Send theme
$message->subject(' email ');
}); 
Rich text sending
\Mail::send('admin.email.email',['name'=>$user['name']] ,function ($message) use ($user) {
$message->to(" Email sent ");
$message->subject(' This is the message ');
});边栏推荐
- Goodbye 2021 Hello 2022
- Use meshlab to sample the point cloud of CAD model and display it in PCL
- Ethical discussion on reptile Technology
- Error reporting injection of SQL injection
- PgSQL reports an error: current transaction is aborted, commands ignored until end of transaction block
- LeetCodeT526
- Fix [no Internet, security] problem
- Detailed installation instructions for MySQL
- A multi classification model suitable for discrete value classification -- softmax regression
- Sword finger offer 04: find in 2D array
猜你喜欢

FPGA面试题目笔记(一)——FPGA开发流程、亚稳态和竞争冒险、建立保持时间、异步FIFO深度等

Servlet

Sqli-libs range 23-24 filtration and secondary injection practice

What is a planning BOM?

Compliance management 101: processes, planning and challenges

Sword finger offer 50: the first character that appears only once

jenkins-凭证管理

Jenkins voucher management

Servlet

Record the first data preprocessing process
随机推荐
做亚马逊测评要了解的知识点有哪些?
JS -- reference type
Twitter data collection (content, fans, keywords, etc.)
What do you need to know about Amazon evaluation?
go的fmt包使用和字符串的格式化
Sword finger offer 04: find in 2D array
Yonghong Bi product experience (I) data source module
Autojs, read one line, delete one line, and stop scripts other than your own
Warmly celebrate that yeyanxiu, senior consultant of Longzhi, won the title of "atlassian Certified Expert"
Simple understanding of XML and JSON
FPGA面试题目笔记(二)——同步异步D触发器、静动态时序分析、分频设计、Retiming
Qmake implementation of QT project Pro script to vs solution
Pycharm usage experience
Free get | full function version of version control software
Growth Diary 01
Servlet
Print sparse arrays and restore
Human gene editing technology and ethical issues behind it [personal view, for reference only]
Managing VHDS using batch
autojs,读取一行删除一行,停止自己外的脚本