Laravel 8 SES 驱动
要使用 Amazon SES 驱动,你必须先安装 PHP 的 Amazon AWS SDK 。你可以在 composer.json 文件的 require 段落加入下面这一行并运行 composer update 命令:
"aws/aws-sdk-php": "~3.0"
然后,将 config/mail.php 配置文件的 default 选项设置成 ses 并确认你的 config/services.php 配置文件包含以下选项:
'ses' => [
'key' => 'your-ses-key',
'secret' => 'your-ses-secret',
'region' => 'ses-region', // e.g. us-east-1
],
如果你在执行 SES SendRawEmail 请求的时候需要包含 附加选项, 你可以在 ses 配置中定义一个 options 数组:
'ses' => [
'key' => 'your-ses-key',
'secret' => 'your-ses-secret',
'region' => 'ses-region', // e.g. us-east-1
'options' => [
'ConfigurationSetName' => 'MyConfigurationSet',
'Tags' => [
[
'Name' => 'foo',
'Value' => 'bar',
],
],
],
],