mehedimi/laravel-sendgrid

一个用于将SendGrid作为Laravel邮件发送驱动程序的包

1.0.0 2021-09-16 15:36 UTC

This package is auto-updated.

Last update: 2024-09-16 22:05:29 UTC


README

Preview

为Laravel框架提供SendGrid邮件发送器

安装

composer require mehedimi/laravel-sendgrid

配置

首先,您需要将sendgrid api配置添加到services.php文件中

'sendgrid' => [
  'api_key' => env('SENDGRID_API_KEY')
]

接下来,您需要将sendgrid mailable配置添加到mail.php文件中的mailers数组中

'sendgrid' => [
    'transport' => 'sendgrid',
    'options' => [
      // optional sendgrid `/mail/send` endpoints value (if you need)
    ]
],

第三步,您需要在.env文件中添加SENDGRID_API_KEY环境变量,并将MAIL_MAILER的值设置为sendgrid