📜  laravel 邮件 - PHP 代码示例

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

代码示例6
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);
                    }

                });

            }