📜  Laravel - 使用邮件类发送邮件 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:13.378000             🧑  作者: Mango

代码示例3
Mail::send(['html' => 'admin.email-template.lowstock'], array('totalUsers' => $totalUsers, 'item' => $item,'data' =>$data), function ($message) use ($user_to_mail, $item) {
                    $message->from('POS@gmail.com', 'POS');
                    $message->subject('Notification Mail');
                    foreach ($user_to_mail as $mail) {
                        $message->to($mail->email);
                    }

                });

            }