diff --git a/app/Http/Livewire/Notifications/EmailSettings.php b/app/Http/Livewire/Notifications/EmailSettings.php
index caeeca2b8..4fe67c24e 100644
--- a/app/Http/Livewire/Notifications/EmailSettings.php
+++ b/app/Http/Livewire/Notifications/EmailSettings.php
@@ -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',
diff --git a/app/Notifications/Channels/CoolifyEmailChannel.php b/app/Notifications/Channels/CoolifyEmailChannel.php
index a32b58381..3f122070f 100644
--- a/app/Notifications/Channels/CoolifyEmailChannel.php
+++ b/app/Notifications/Channels/CoolifyEmailChannel.php
@@ -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())
);
}
diff --git a/resources/views/livewire/notifications/email-settings.blade.php b/resources/views/livewire/notifications/email-settings.blade.php
index a87b10abb..dbcf16c3b 100644
--- a/resources/views/livewire/notifications/email-settings.blade.php
+++ b/resources/views/livewire/notifications/email-settings.blade.php
@@ -25,6 +25,8 @@