php利用laravel的Notification实现邮件通知实例:
<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; public function toMail($notifiable) { $this->title = "***审核通知"; $this->content = "恭喜您模版:*****审核成功"; return (new MailMessage) ->subject('审核通知') ->greeting('标题:{' . $this->title . '}') ->line($this->content) ->line("如果你想了解更多信息,请访问官网:") ->line('www.zhangsan.com') ->line('如果您的帐号存在问题,请联系我们:') ->line(gg@qq.com'); }laravel文档地址:http://laravelacademy.org/post/6116.html