feat: configurable SMTP_FROM_NAME via .env (defaults to BOHA Automation)
This commit is contained in:
@@ -37,6 +37,7 @@ export const config = {
|
||||
contactTo: process.env.CONTACT_EMAIL_TO || '',
|
||||
contactFrom: process.env.CONTACT_EMAIL_FROM || '',
|
||||
smtpFrom: process.env.SMTP_FROM || '',
|
||||
smtpFromName: process.env.SMTP_FROM_NAME || 'BOHA Automation',
|
||||
leaveNotify: process.env.LEAVE_NOTIFY_EMAIL || '',
|
||||
},
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export async function sendMail(to: string, subject: string, html: string): Promi
|
||||
|
||||
try {
|
||||
await transporter.sendMail({
|
||||
from: `System <${from}>`,
|
||||
from: `${config.email.smtpFromName} <${from}>`,
|
||||
to,
|
||||
subject,
|
||||
html,
|
||||
|
||||
Reference in New Issue
Block a user