用户将拥有一个表单,他将在其中填写信息,并且在执行表单时,他将使该代码发送电子邮件,但是我希望与其成为一个接收电子邮件的人,我想知道如何我可以使其成为用户放入表格中以接收的电子邮件吗?
Mail::send('emails.checkout.mail', [
'email' => $request->email,
'total' => $total], function ($messagem) use ($request) {
$messagem->from('noreply@xxx.com', 'Noreply');
$messagem->to('EMAIL OF USER')->subject('new menssage');
});
答案 0 :(得分:1)
Mail::send('emails.checkout.mail', [
'email' => $request->email,
'total' => $total], function ($messagem) use ($request) {
$messagem->from('noreply@xxx.com', 'Noreply');
$messagem->to($request->email)->subject('new menssage');
});
发送到$ request->电子邮件