murattcann / sendgrid-mailer
一个使用Sendgrid发送邮件的包
dev-main
2022-07-14 15:31 UTC
Requires
- sendgrid/sendgrid: ^8.0
This package is auto-updated.
Last update: 2024-09-14 20:09:45 UTC
README
安装
composer require murattcann/sendgrid-mailer
运行以下命令后,运行这个命令: php artisan vendor:publish
然后输入 sendgridmailer-config 索引号,按回车。
发布过程结束后,编辑 config\sendgrid_credentials.php 文件如下
return [ "token" => "你的Sendgrid token", "from_email" => "发送者邮箱地址", "from_name" => "邮件发送者名称", "default_subject" => "默认邮件主题", ];
此包的用法
SendgridSender::getInstance()->to("发送的邮箱地址")>subject("你的邮件主题")>send("你的邮件内容或HTML数据")