Sending e-mails and settings on Team.
This commit is contained in:
parent
f23a760aac
commit
ec867335d5
@ -12,6 +12,8 @@ class EmailSettings extends Component
|
||||
|
||||
protected $rules = [
|
||||
'model.extra_attributes.smtp_active' => 'nullable|boolean',
|
||||
'model.extra_attributes.from_address' => 'nullable',
|
||||
'model.extra_attributes.from_name' => 'nullable',
|
||||
'model.extra_attributes.recipients' => 'nullable',
|
||||
'model.extra_attributes.smtp_host' => 'nullable',
|
||||
'model.extra_attributes.smtp_port' => 'nullable',
|
||||
@ -21,6 +23,8 @@ class EmailSettings extends Component
|
||||
'model.extra_attributes.smtp_timeout' => 'nullable',
|
||||
];
|
||||
protected $validationAttributes = [
|
||||
'model.extra_attributes.from_address' => 'From Address',
|
||||
'model.extra_attributes.from_name' => 'From Name',
|
||||
'model.extra_attributes.recipients' => 'Recipients',
|
||||
'model.extra_attributes.smtp_host' => 'Host',
|
||||
'model.extra_attributes.smtp_port' => 'Port',
|
||||
|
@ -18,10 +18,13 @@ class CoolifyEmailChannel
|
||||
$mailMessage = $notification->toMail($notifiable);
|
||||
|
||||
Mail::send([], [], fn(Message $message) => $message
|
||||
->from('ask@me.com', 'My Coolify Instance')
|
||||
->from(
|
||||
$notifiable->extra_attributes?->get('from_address'),
|
||||
$notifiable->extra_attributes?->get('from_name')
|
||||
)
|
||||
->bcc($bcc)
|
||||
->subject($mailMessage->subject)
|
||||
->html((string) $mailMessage->render())
|
||||
->html((string)$mailMessage->render())
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
<x-inputs.input id="model.extra_attributes.smtp_timeout" label="Timeout" />
|
||||
</div>
|
||||
<div class="flex flex-col w-96">
|
||||
<x-inputs.input id="model.extra_attributes.from_address" label="From Address" />
|
||||
<x-inputs.input id="model.extra_attributes.from_name" label="From Name" />
|
||||
<x-inputs.input id="model.extra_attributes.test_address" label="Send test e-mails to" />
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user