📜  laravel 邮件发送灵活主题 - PHP 代码示例

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

代码示例1
$arrayEmails = ['someone@mail.com','stranger@mail.com'];
$emailSubject = 'My Subject';
$emailBody = 'Hello, this is my message content.';

Mail::send('emails.normal',
    ['msg' => $emailBody],
    function($message) use ($arrayEmails, $emailSubject) {
        $message->to($arrayEmails)
        ->subject($emailSubject);
    }
);