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 || '',
|
contactTo: process.env.CONTACT_EMAIL_TO || '',
|
||||||
contactFrom: process.env.CONTACT_EMAIL_FROM || '',
|
contactFrom: process.env.CONTACT_EMAIL_FROM || '',
|
||||||
smtpFrom: process.env.SMTP_FROM || '',
|
smtpFrom: process.env.SMTP_FROM || '',
|
||||||
|
smtpFromName: process.env.SMTP_FROM_NAME || 'BOHA Automation',
|
||||||
leaveNotify: process.env.LEAVE_NOTIFY_EMAIL || '',
|
leaveNotify: process.env.LEAVE_NOTIFY_EMAIL || '',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export async function sendMail(to: string, subject: string, html: string): Promi
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await transporter.sendMail({
|
await transporter.sendMail({
|
||||||
from: `System <${from}>`,
|
from: `${config.email.smtpFromName} <${from}>`,
|
||||||
to,
|
to,
|
||||||
subject,
|
subject,
|
||||||
html,
|
html,
|
||||||
|
|||||||
Reference in New Issue
Block a user