你可以用Laravel这样的电子邮件发送通知.
<?php
public function toMail($notifiable)
{
$url = url('/invoice/' . $this->invoice->id);
return (new MailMessage)
->greeting('Hello!')
->line('One of your invoices has been paid!')
->action('View
我想发送邮件标题和正文从数据库到所有用户的电子邮件和电子邮件发送,但默认文本显示在电子邮件。来自数据库的标题未在电子邮件中发送。
通知类
class RepliedToThread extends Notification
{
use Queueable;
public $event;
public function __construct($event)
{
$this->event=$event;
}
public function via($notifiable)
{
return ['database','broadcast'
我想通过电子邮件发送大量的潜在客户,所以我使用批处理,并将每个电子邮件发送作为批处理作业进行推送,如下所示:
public function __construct(RunReport $runReport, User $run_by) {
$this->runReport = $runReport;
$this->run_by = $run_by;
}
public function handle()
{
$company_detail = CompanyDetail::first();