feat: Adds ability to set Notification Email From name.

closes #222
This commit is contained in:
towfiqi
2024-11-07 21:15:12 +06:00
parent a09eb62f5a
commit b35d333bfc
5 changed files with 14 additions and 1 deletions

View File

@@ -62,9 +62,10 @@ const sendNotificationEmail = async (domain: Domain, settings: SettingsType) =>
smtp_password = '',
notification_email = '',
notification_email_from = '',
notification_email_from_name = 'SerpBear',
} = settings;
const fromEmail = `SerpBear <${notification_email_from || 'no-reply@serpbear.com'}>`;
const fromEmail = `${notification_email_from_name} <${notification_email_from || 'no-reply@serpbear.com'}>`;
const mailerSettings:any = { host: smtp_server, port: parseInt(smtp_port, 10) };
if (smtp_username || smtp_password) {
mailerSettings.auth = {};

View File

@@ -119,6 +119,7 @@ export const getAppSettings = async () : Promise<SettingsType> => {
notification_interval: 'never',
notification_email: '',
notification_email_from: '',
notification_email_from_name: 'SerpBear',
smtp_server: '',
smtp_port: '',
smtp_username: '',