自己做的网站主页被人篡改,千博企业网站管理系统营销旗舰版,jsp网站开发详解 下载,网站欣赏 公司网站案例通过MailHog#xff0c;可以在浏览器中查看本机发的邮件内容#xff0c;而无需发送到外网。
https://github.com/mailhog/MailHog在 macOS 环境下#xff0c;下载文件后: 添加可执行权限:chmod x MailHog_darwin_amd64 运行:./MailHog_darwin_amd64 浏览器打开查看邮件:htt…通过MailHog可以在浏览器中查看本机发的邮件内容而无需发送到外网。
https://github.com/mailhog/MailHog在 macOS 环境下下载文件后: 添加可执行权限:chmod x MailHog_darwin_amd64 运行:./MailHog_darwin_amd64 浏览器打开查看邮件:http://0.0.0.0:8025/
Laravel 发送邮件到 MailHog 使用例子
Laravel .env:
MAIL_MAILERsmtp
MAIL_DRIVERsmtp
MAIL_HOST127.0.0.1
MAIL_PORT1025
MAIL_USERNAMExxqq.com
MAIL_PASSWORDxx
MAIL_ENCRYPTION
MAIL_FROM_ADDRESSxxqq.com
MAIL_FROM_NAMEAPP通过 notifications 发送邮件通知 https://learnku.com/docs/laravel/10.x/notifications/14870#0b4ad8
public function toMail($notifiable)
{$title 系统通知: . 运单- . $this-data[data][waybill]-name . 有来自 . $this-data[user] . 的新留言:;$line_title 运单- . $this-data[data][waybill]-name . 有来自 . $this-data[user] . 的新留言:;return (new MailMessage)-subject($title)-line($line_title)-line($this-data[data][message])-action($this-data[data][waybill]-name, url(waybill/) ./. $this-data[id])-line(Thank you for using our application!);
}