Skip to content

Commit

Permalink
fix(vercel): add sender_email env to custom mail from fix #120
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Jan 4, 2021
1 parent 8ad1fde commit e5e9af8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@waline/vercel",
"description": "vercel server for waline comment system",
"version": "0.20.3",
"version": "0.20.4",
"author": "lizheming <i@imnerd.org>",
"scripts": {
"lint": "eslint src/",
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/service/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = class extends think.Service {
return;
}

const {SITE_NAME, SITE_URL, SMTP_USER} = process.env;
const {SITE_NAME, SITE_URL, SMTP_USER, SENDER_EMAIL, SENDER_NAME} = process.env;
const data = {
self,
parent,
Expand All @@ -44,7 +44,7 @@ module.exports = class extends think.Service {
content = nunjucks.renderString(content, data);

return this.transporter.sendMail({
from: SMTP_USER,
from: SENDER_EMAIL && SENDER_NAME ? `"${SENDER_NAME}" <${SENDER_EMAIL}>` : SMTP_USER,
to,
subject: title,
html: content
Expand Down

0 comments on commit e5e9af8

Please sign in to comment.