📜  laravel 邮件发送 - PHP 代码示例

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

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

                });

            }