Skip to content

Commit 208f1c4

Browse files
Iaotlesimonschaufi
authored andcommitted
Add mailers config
1 parent 1492b4e commit 208f1c4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

config/dkim.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
'passphrase' => env('DKIM_PASSPHRASE', ''),
1010
'algorithm' => env('DKIM_ALGORITHM', 'rsa-sha256'),
1111
'identity' => env('DKIM_IDENTITY', null),
12+
'mailers' => env('DKIM_MAILERS', ['smtp', 'sendmail', 'log', 'mail']),
1213
];

src/Mailer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public function send($view, array $data = [], $callback = null): ?SentMessage
5757
$privateKey = config('dkim.private_key');
5858
$selector = config('dkim.selector');
5959
$domain = config('dkim.domain');
60-
if (in_array(strtolower(config('mail.default')), ['smtp', 'sendmail', 'log', 'mail'])) {
60+
$mailers = config('dkim.mailers');
61+
if (in_array(strtolower(config('mail.default')), $mailers, true)) {
6162
if (empty($privateKey)) {
6263
throw new InvalidArgumentException('No private key set.', 1588115551);
6364
}

0 commit comments

Comments
 (0)