diff --git a/overseerr-api.yml b/overseerr-api.yml index 627836adc..cac66b2b7 100644 --- a/overseerr-api.yml +++ b/overseerr-api.yml @@ -886,6 +886,9 @@ components: emailFrom: type: string example: no-reply@example.com + senderName: + type: string + example: Overseerr smtpHost: type: string example: 127.0.0.1 diff --git a/server/lib/notifications/agents/email.ts b/server/lib/notifications/agents/email.ts index 18cd3e594..4e2c8ceba 100644 --- a/server/lib/notifications/agents/email.ts +++ b/server/lib/notifications/agents/email.ts @@ -60,7 +60,10 @@ class EmailAgent const settings = this.getSettings(); return new Email({ message: { - from: settings.options.emailFrom, + from: { + name: settings.options.senderName, + address: settings.options.emailFrom, + }, }, send: true, transport: this.getSmtpTransport(), diff --git a/server/lib/settings.ts b/server/lib/settings.ts index 1d25be5d2..75d3c72fc 100644 --- a/server/lib/settings.ts +++ b/server/lib/settings.ts @@ -81,6 +81,7 @@ export interface NotificationAgentEmail extends NotificationAgentConfig { authUser?: string; authPass?: string; allowSelfSigned: boolean; + senderName: string; }; } @@ -148,6 +149,7 @@ class Settings { smtpPort: 587, secure: false, allowSelfSigned: false, + senderName: 'Overseerr', }, }, discord: { diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index 75f6740b2..c2fd0b0b4 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -28,6 +28,7 @@ const messages = defineMessages({ allowselfsigned: 'Allow Self-Signed Certificates', ssldisabletip: 'SSL should be disabled on standard TLS connections (Port 587)', + senderName: 'Sender Name', }); const NotificationsEmail: React.FC = () => { @@ -65,6 +66,7 @@ const NotificationsEmail: React.FC = () => { authUser: data.options.authUser, authPass: data.options.authPass, allowSelfSigned: data.options.allowSelfSigned, + senderName: data.options.senderName, }} validationSchema={NotificationsEmailSchema} onSubmit={async (values) => { @@ -80,6 +82,7 @@ const NotificationsEmail: React.FC = () => { authUser: values.authUser, authPass: values.authPass, allowSelfSigned: values.allowSelfSigned, + senderName: values.senderName, }, }); addToast(intl.formatMessage(messages.emailsettingssaved), { @@ -108,6 +111,7 @@ const NotificationsEmail: React.FC = () => { secure: values.secure, authUser: values.authUser, authPass: values.authPass, + senderName: values.senderName, }, }); @@ -157,6 +161,25 @@ const NotificationsEmail: React.FC = () => { )} +
+ +
+
+ +
+
+