replyto
This commit is contained in:
parent
3a06f2fff9
commit
027a6e6375
@ -3,4 +3,5 @@ SMTP_PORT=2525
|
|||||||
SMTP_USER=your_smtp_user
|
SMTP_USER=your_smtp_user
|
||||||
SMTP_PASS=your_smtp_password
|
SMTP_PASS=your_smtp_password
|
||||||
EMAIL_FROM=noreply@example.com
|
EMAIL_FROM=noreply@example.com
|
||||||
|
EMAIL_REPLYTO=noreply@example.com
|
||||||
REDIS_URL=redis://localhost:6379
|
REDIS_URL=redis://localhost:6379
|
@ -20,6 +20,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "22.9.1",
|
"@types/node": "22.9.1",
|
||||||
|
"@types/nodemailer": "^6.4.17",
|
||||||
"bun-types": "1.1.36"
|
"bun-types": "1.1.36"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,8 @@ export const config = {
|
|||||||
pass: process.env.SMTP_PASS || ''
|
pass: process.env.SMTP_PASS || ''
|
||||||
},
|
},
|
||||||
email: {
|
email: {
|
||||||
from: process.env.EMAIL_FROM || 'noreply@example.com'
|
from: process.env.EMAIL_FROM || 'noreply@example.com',
|
||||||
|
replyTo: process.env.EMAIL_REPLYTO || 'noreply@example.com',
|
||||||
},
|
},
|
||||||
redis: {
|
redis: {
|
||||||
url: process.env.REDIS_URL || 'redis://localhost:6379'
|
url: process.env.REDIS_URL || 'redis://localhost:6379'
|
||||||
|
@ -41,10 +41,11 @@ const worker = new Worker<EmailJob>(
|
|||||||
async (job) => {
|
async (job) => {
|
||||||
await transporter.sendMail({
|
await transporter.sendMail({
|
||||||
from: config.email.from,
|
from: config.email.from,
|
||||||
|
replyTo: config.email.replyTo,
|
||||||
to: job.data.to,
|
to: job.data.to,
|
||||||
subject: job.data.subject,
|
subject: job.data.subject,
|
||||||
text: job.data.text,
|
text: job.data.text,
|
||||||
html: job.data.html
|
html: job.data.html,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user