diff --git a/overseerr-api.yml b/overseerr-api.yml index 268fa896a..f6d6aab53 100644 --- a/overseerr-api.yml +++ b/overseerr-api.yml @@ -824,7 +824,9 @@ components: authPass: type: string nullable: true - + allowSelfSigned: + type: boolean + example: false PersonDetail: type: object properties: diff --git a/server/lib/notifications/agents/email.ts b/server/lib/notifications/agents/email.ts index 7f166cf2c..90755e929 100644 --- a/server/lib/notifications/agents/email.ts +++ b/server/lib/notifications/agents/email.ts @@ -41,6 +41,11 @@ class EmailAgent host: emailSettings.smtpHost, port: emailSettings.smtpPort, secure: emailSettings.secure, + tls: emailSettings.allowSelfSigned + ? { + rejectUnauthorized: false, + } + : undefined, auth: emailSettings.authUser && emailSettings.authPass ? { diff --git a/server/lib/settings.ts b/server/lib/settings.ts index 4b075af85..b0d2c45fa 100644 --- a/server/lib/settings.ts +++ b/server/lib/settings.ts @@ -74,6 +74,7 @@ export interface NotificationAgentEmail extends NotificationAgentConfig { secure: boolean; authUser?: string; authPass?: string; + allowSelfSigned: boolean; }; } @@ -129,8 +130,9 @@ class Settings { options: { emailFrom: '', smtpHost: '127.0.0.1', - smtpPort: 465, + smtpPort: 587, secure: false, + allowSelfSigned: false, }, }, discord: { diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index 304594204..abcb22dad 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -25,6 +25,9 @@ const messages = defineMessages({ emailsettingsfailed: 'Email notification settings failed to save.', test: 'Test', testsent: 'Test notification sent!', + allowselfsigned: 'Allow Self-Signed Certificates', + ssldisabletip: + 'SSL should be disabled on standard TLS connections (Port 587)', }); const NotificationsEmail: React.FC = () => { @@ -61,6 +64,7 @@ const NotificationsEmail: React.FC = () => { secure: data.options.secure, authUser: data.options.authUser, authPass: data.options.authPass, + allowSelfSigned: data.options.allowSelfSigned, }} validationSchema={NotificationsDiscordSchema} onSubmit={async (values) => { @@ -75,6 +79,7 @@ const NotificationsEmail: React.FC = () => { secure: values.secure, authUser: values.authUser, authPass: values.authPass, + allowSelfSigned: values.allowSelfSigned, }, }); addToast(intl.formatMessage(messages.emailsettingssaved), { @@ -116,7 +121,7 @@ const NotificationsEmail: React.FC = () => {
-
+
{errors.emailFrom && touched.emailFrom && ( -
{errors.emailFrom}
+
{errors.emailFrom}
)}
-
+
{errors.smtpHost && touched.smtpHost && ( -
{errors.smtpHost}
+
{errors.smtpHost}
)}
-
+
{errors.smtpPort && touched.smtpPort && ( -
{errors.smtpPort}
+
{errors.smtpPort}
)}
+
+
+
+ +
+
-
+
-
+
-
+
- + - +