Skip to content

Commit 7f7ec7b

Browse files
authored
Feat: add mailers detail for failover or roundrobin (#57590)
* feat: add mailers detail for failover or roundrobin * feat: fix mailer driver check
1 parent d95fe95 commit 7f7ec7b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/Illuminate/Foundation/Console/AboutCommand.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,21 @@ protected function gatherApplicationInformation()
221221

222222
return $logs;
223223
},
224-
'Mail' => config('mail.default'),
224+
'Mail' => function ($json) {
225+
$mailMailer = config('mail.default');
226+
227+
if (in_array(config('mail.mailers.'.$mailMailer.'.transport'), ['failover', 'roundrobin'])) {
228+
$secondary = new Collection(config('mail.mailers.'.$mailMailer.'.mailers'));
229+
230+
return value(static::format(
231+
value: $mailMailer,
232+
console: fn ($value) => '<fg=yellow;options=bold>'.$value.'</> <fg=gray;options=bold>/</> '.$secondary->implode(', '),
233+
json: fn () => $secondary->all(),
234+
), $json);
235+
}
236+
237+
return $mailMailer;
238+
},
225239
'Octane' => config('octane.server'),
226240
'Queue' => function ($json) {
227241
$queueConnection = config('queue.default');

0 commit comments

Comments
 (0)