Skip to content

Commit

Permalink
Add email from
Browse files Browse the repository at this point in the history
  • Loading branch information
soruly committed Nov 25, 2024
1 parent b0e8d81 commit 06e4fa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SOLA_SOLR_SIZE=1
# EMAIL_SMTP_PORT=587
# EMAIL_USER=
# EMAIL_PASS=
# EMAIL_FROM

# Sponsor setting, leave empty to disable
# WEBHOOK_GITHUB_SECRET=
Expand Down
4 changes: 2 additions & 2 deletions src/lib/create-new-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import nodemailer from "nodemailer";
import generateAPIKey from "./generate-api-key.js";

const { SOLA_DB_NAME, TRACE_API_SALT, EMAIL_SMTP, EMAIL_SMTP_PORT } = process.env;
let { EMAIL_USER, EMAIL_PASS } = process.env;
let { EMAIL_USER, EMAIL_PASS, EMAIL_FROM } = process.env;

const __filename = new URL("", import.meta.url).pathname;
const __dirname = new URL(".", import.meta.url).pathname;
Expand Down Expand Up @@ -64,7 +64,7 @@ export default async (knex, email, tier, full_name = "") => {
});

const info = await transporter.sendMail({
from: `"trace.moe" <${EMAIL_USER}>`,
from: `"trace.moe" <${EMAIL_FROM}>`,
to: email,
bcc: EMAIL_USER,
subject: "Thank you for supporting trace.moe",
Expand Down

0 comments on commit 06e4fa1

Please sign in to comment.