updates
This commit is contained in:
parent
19a83bb2c0
commit
d80b0f77c5
@ -16,7 +16,7 @@ class EmailSettings extends Component
|
||||
'model.extra_attributes.smtp_active' => 'nullable|boolean',
|
||||
'model.extra_attributes.smtp_from_address' => 'required|email',
|
||||
'model.extra_attributes.smtp_from_name' => 'required',
|
||||
'model.extra_attributes.smtp_recipients' => 'required',
|
||||
'model.extra_attributes.smtp_recipients' => 'nullable',
|
||||
'model.extra_attributes.smtp_host' => 'required',
|
||||
'model.extra_attributes.smtp_port' => 'required',
|
||||
'model.extra_attributes.smtp_encryption' => 'nullable',
|
||||
|
@ -11,11 +11,15 @@ class EmailChannel
|
||||
public function send(SendsEmail $notifiable, Notification $notification): void
|
||||
{
|
||||
$this->bootConfigs($notifiable);
|
||||
|
||||
$is_test_notification = $notification instanceof \App\Notifications\TestNotification;
|
||||
|
||||
if ($is_test_notification) {
|
||||
$bcc = $notifiable->routeNotificationForEmail('smtp_test_recipients');
|
||||
if (count($bcc) === 0) {
|
||||
if ($notifiable instanceof \App\Models\Team) {
|
||||
$bcc = $notifiable->members()->pluck('email')->toArray();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$bcc = $notifiable->routeNotificationForEmail();
|
||||
}
|
||||
|
@ -22,9 +22,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input required id="model.extra_attributes.smtp_recipients"
|
||||
<x-forms.input id="model.extra_attributes.smtp_recipients"
|
||||
placeholder="If empty, all users will be notified in the team."
|
||||
helper="Email list to send the all notifications to, separated by comma." label="Recipient(s)" />
|
||||
<x-forms.input id="model.extra_attributes.smtp_test_recipients" label="Test Notification Recipient(s)"
|
||||
placeholder="If empty, all users will be notified in the team."
|
||||
helper="Email list to send the test notification to, separated by comma." />
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
|
Loading…
x
Reference in New Issue
Block a user